Last modified: 2013-09-29 12:20:46 UTC
Created attachment 11114 [details] Parser bug See the link above and/or the attached screenshot. The second example is converted correctly by Parsoid, but the first is still broken: http://parsoid.wmflabs.org/_rt/pt/Project:P%C3%A1gina_de_testes/1?oldid=32235099
For the record, I found this while I was trying to fix the rendering of the second and third groups of a navbox: https://pt.wikipedia.org/w/index.php?title=Wikip%C3%A9dia:P%C3%A1gina_de_testes/1&oldid=32234126&action=edit&preview=yes
Raised by [[User:Edokter]] at [[Wikipedia:Village pump (technical)#Old_parser_bug.3F]], with a navbox example showing the parser use a single <ol>...</ol> container for adjacent * and # lists even though are in different div elements within different cells or different rows of a wikitable. Where block elements have closing tags that are not at the start of a separate line, the parser wrongly treats list items within different containers as part of a single list. Consequently, the browser sees tag soup and assumes there are separate lists, treating the second or subsequent block of <li> elements as contained by an implicit <ul>...</ul>. (Equivalently, if HTML Tidy is active, it attempts to correct the inconsistency by closing the first list, inserting <ul>...</ul> tags around the second and subsequent lists and removing any trailing </ol> tag.) As a side effect, any ordered lists that are not in the first block are rendered as unordered lists, because their list items have no explicit <ol> tags. The parser needs to learn that list items within different block-level elements are separate lists, and insert container list tags in the appropriate places accordingly.
(In reply to comment #2) > Raised by [[User:Edokter]] at Permanent link: https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)?oldid=540225657#Old_parser_bug.3F
I fixed navbox so that list items always ocupy there own line, that fixes the problem. For reference: Incorrect: <div> # list item 1 # list item 2</div> Correct: <div> # list item 1 # list item 2 </div> It it essentially bad wiki formatting to include closing tags on the same line as wiki list items. So I'm closing this.