Jump to content

Topic on Help talk:Lint errors/multiline-html-table-in-list

"An alternative fix would be to make the HTML table be on the same line."

2
Anomalocaris (talkcontribs)

It says, "An alternative fix would be to make the HTML table be on the same line." This is ambiguous: It could mean, begin the table on "... the same line as the bullet (or other markup) that makes the table part of a list". Although it's a valid interpretation, it can't be right, because the table already begins there. I believe the intended meaning is that the entire table, from <table> to </table>, has to be entered with no newline characters between them. It should say this more clearly, perhaps as "An alternative fix would be to enter the HTML table all one one line, from <table> to </table>." That is a workaround for the bug, but it ignores the larger problem that Wiki markup includes special table markup that requires <table> ({|), <li> (|-), and </table> (|}) to be at the beginning of new lines. (Here, I intentionally did not put the 3 wiki table markup elements inside <nowiki>...</nowiki> to emphasize that they are not treated as wiki markup when they aren't at the beginning of a new line.) So the sentence should be followed with something like, "Of course, this won't work if the table is entered with wiki table markup, where several elements have to start on new lines."

RexxS (talkcontribs)

You may place a table, or its wiki-markup equivalents, inside a template so that the markup starts on new lines and then transclude the template anywhere in a piece of text.

However, if the transclusion occurs inside a list item (including a colon-indented discussion), you get the unclosed list bug. Since a newline closes a list item, putting the table on a new line certainly avoids the bug , but then breaks the list for screen readers and for ordered lists where the numbering will restart from 1 at the next list item (i.e. it's a new list).

Reply to ""An alternative fix would be to make the HTML table be on the same line.""