Line breaks changes behavior of "#" inside of tables: it generates bulleted lists instead of an ordered one
Closed, InvalidPublic

Description

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


Version: unspecified
Severity: normal
URL: https://pt.wikipedia.org/wiki/Project:P%C3%A1gina_de_testes/1?oldid=32235034&uselang=en

Attached:

bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz40274.
He7d3r created this task.Via LegacySep 15 2012, 7:20 PM
He7d3r added a comment.Via ConduitSep 15 2012, 7:32 PM

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

bzimport added a comment.Via ConduitFeb 25 2013, 1:35 AM

richardg_uk wrote:

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.

He7d3r added a comment.Via ConduitFeb 25 2013, 11:22 AM

(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

Edokter added a comment.Via ConduitSep 29 2013, 12:20 PM

I fixed navbox so that list items always ocupy there own line, that fixes the problem.

For reference:

Incorrect:
<div>

  1. list item 1
  2. list item 2</div>

Correct:
<div>

  1. list item 1
  2. 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.

Add Comment