https://bugzilla.wikimedia.org/show_bug.cgi?id=17486
--- Comment #24 from Philippe Verdy <[email protected]> 2011-11-23 09:08:15 UTC --- No, this is about tables inside lists (or any wiki feature that requires a single line syntax: this applies to unnumbered lists with "*" converted to ul/li, numbered lists with "#" converted to ol/il, and definition lists starting with ";" and ":" converted to "dl/dt/dd"). Lists inside tables have no problems. I really think that wiki-tables should have a syntax that removes the single line constraint : I suggested a syntax starting with "{||" instead of just "{|" to mean that every thing, up to the closing "|}" would be a table, and that all cells MUST be initiated by "||" for td, or "!!" for th, and new rows start with "|-", independantly of how newlines are found in the wikisource, so that a single or multiple line wiki-syntax for tables would be accepted and recognized such as: * list item * another list item containing a table: {||class="wikitable" |-valign="top" !!scope="row"|header cell of 1st row ||align="right"|1st data cell |-valign="top" !!scope="row"|header cell of 2nd row ||align="right"|2nd data cell |} * another list item containing a table broken multiple lines: {||class="wikitable" |-valign="top" !!scope="row"|header cell of 1st row ||align="right"| 1st data cell |-valign="top" !!scope="row"|header cell of 2nd row ||align="right"| 2nd data cell * another list item containing a table: {||class="wikitable" |+align="center"|Table caption |-valign="top" !!scope="row"|header cell ||align="right"|data cell |-valign="top" !!scope="row"|header cell ||align="right"|2nd data cell |} When parsing this syntax, all cell contents are parsed as if they were already at the begining of a new block, meaning that line breaks are only converted to create new paragraphs if there are two line breaks. If there are no two-linebreaks, then the cell content will not be converted into a paragraph (with the "p" element), however, if there are any two-linebreaks in that content, all paragraphs including the first one will be converted to a "p" element in that cell content. Whitespaces in cell contents or captions should continue to be compressed, and single line breaks converted to a compressable whitespace. In this syntax, the "!!" cell separator would not convert cells starting by "||" on the same line into header cells (I think this is a bad inconsistency of the Wiki syntax, which also forces us to break the line when a header cell is followed by a data cell, and does not help making the syntax compact and easily readable, just like in the last list item above). The parser should also take care of NOT breaking a list item where it contains a new explicit HTML block element that requires an explicit closure (for example div, blockquote, pre, and HTML or wiki tables). This requires a change on how wiki-lines starting by "*", "#", ";" and ":" are parsed: they will have to read for more lines to find the end of the embedded elements. Also, there's stil lthe lack of support for adding attributes to list items and to their containing list element. Why can't we have the syntax like: {* attributes for the unnumbered list container (ul) * simple list item * another list item * attributes for the list item| bulleted list item content whose content includes... multiple paragraphs... * attributes for the list item| bulleted list item content whose content is splitted on multiple lines (whitespace compressed by the parser) *} Note: attributes on list items, separated by "*"-lines are optional: the first "|" delimits where attributes are terminated before the visible content. We then gain also more freedom in adding empty lines between list items, because whitespaces at end of an item are always trimmed. Idem for numbered lists using "{#" and "#}": {# attributes for the numbered list container (ol) # attributes for the list item| numbered list item content # attributes for the list item| numbered list item content *} Or for definition lists using "{;" and ";}": {; attributes for the definition list container (dl) ; attributes for the defined term| defined term content ; attributes for the list item| numbered list item content *} This would also simplify the design of lots of templates, with less problems when transcluding them in lists (notably when a text-like template requires some special formatting to support some advanced typography, or special layouts emulating some text features using positioned block elements). -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
