MediaWiki – Multi-Line <pre></pre> within List
Background: MediaWiki is open source software used to create wikis; it was developed for and is currently used by Wikipedia. I am using version 1.15.4.
I’ve spent a lot of time searching without success for a way to insert a multi-line pre-formatted block of text within an ordered or unordered list in MediaWiki using wiki markup * and # syntax. Today I finally figured out this can be done using either (Line Feed) or (Carriage Return). I haven’t tested across platforms or browsers, but here is an example:
* Element A * Element B *# Element B.one *# Element B.two <pre>Multi-line pre-formatted block</pre> *# Element B.three * Element C
which renders on my system as:
Dmitry said,
October 5, 2011 at 09:47
Thanks, that helped me.
Johnny said,
October 6, 2011 at 21:37
Please delete my previous 3 comments
dansesacrale said,
October 6, 2011 at 21:59
I know you can use HTML for the list; the whole point of this post is to do it without HTML. Read carefully: “…using wiki markup * and # syntax”. You can call it an aesthetic concern. I find it surprising that there is no simple built-in way to accomplish this with wiki markup (to my knowledge, and at the time the post was made since I haven’t investigated since then). But the HTML way may help someone, so it’s worth noting; I probably should have done so originally. Thanks.