Jump to content

Topic on Project:Support desk

unexpected formatting with PRE and OL

3
64.247.128.12 (talkcontribs)

When I try to use a preformatted text block containing line-breaks within an ordered list, the text from the PRE block ends up outside of the formatted text area (gray block).

This works as expected:

  1. Show some preformatted text:
    This is preformatted text!

This works as expected:

This is preformatted text!
Both lines show up in the box.

This does not:

  1. show an empty text box and put the contents on the following line :
     This should be preformatted text!
    Neither of these lines will show up in the text box!
Bawolff (talkcontribs)

The line break terminates the <li> and <ol> which causes the <pre> to be nested incorrectly and be cut off (depending on if you use tidy, what actually happens may vary).

The work around, is instead of using # syntax for the list, explicitly use html style <ol><li><pre>text here</pre></li></ol>

Reply to "unexpected formatting with PRE and OL"