Jump to content

<pre> with lists


 Share

Recommended Posts

Many games fixbox use <pre> tag with list, mostly to show what needs to be changed in config etc. This doesn't work with numbered list as it breaks and even with regular list style breaks as <pre> content is bit more to left than list itself. 

 

Most of the time I see it's done by manually faking formatting and putting 1. 2. etc. instead of # and using spaces and enters to make it look OK but makes it much harder to actually modify and read as wikitext afterwards. 

 

I don't think it's possible to make changes to MediaWiki code and make <pre> work with lists. Only legit way of doing this as far as I know is to use HTML and <ol> <li> tags. 

 

Is there other way of doing this? If not then that HTML variation should be included in example article. 

Link to comment
Share on other sites

  • 3 months later...

Manual numbering with : results in same style as automatic numbering with #:

:1. Go there
:2. Open this
:3. Add this
<pre>line 1
line 2
last line</pre>
:4. Save
Link to comment
Share on other sites

http://pcgamingwiki.com/wiki/User:Marioysikax/Sandbox 

Upper is HTML, lower is your example. With basic HTML it works wonderfully. 

 

Your example doesn't work optimally. : isn't actually starting or continuing list but simply moves starting point slightly right, but not the same amount as numbered list. <pre> content is also starting from very left. 

 

I know this is mostly nitpicking but as <pre> is used with fixboxes all the time it starts to irritate. 

Link to comment
Share on other sites

 Share

  • Found PCGamingWiki useful? Please consider making a Donation or visiting our Patreon.
  • Who's Online   1 Member, 0 Anonymous, 517 Guests (See full list)

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Forum Statistics

    1.8k
    Total Topics
    9.2k
    Total Posts
×
×
  • Create New...