Last modified: 2013-09-29 12:20:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42274, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40274 - Line breaks changes behavior of "#" inside of tables: it generates bulleted lists instead of an ordered one
Line breaks changes behavior of "#" inside of tables: it generates bulleted l...
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
https://pt.wikipedia.org/wiki/Project...
: need-parsertest, newparser, parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-15 19:20 UTC by Helder
Modified: 2013-09-29 12:20 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Parser bug (30.48 KB, image/png)
2012-09-15 19:20 UTC, Helder
Details

Description Helder 2012-09-15 19:20:48 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
Comment 1 Helder 2012-09-15 19:32:39 UTC
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
Comment 2 Richard Guk 2013-02-25 01:35:46 UTC
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.
Comment 4 Erwin Dokter 2013-09-29 12:20:46 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links