I found this task in [[mw:Parsoid/Todo]]: * Move list handler from tokenizer to sync23 phase token transformer to support list items from templates.
Does this mean, using a template like {{Foreach|delim=*}} can generate some list items, and the calling page has control over whether these items are in their own list, or continue another list? In this case, the attached tests describe the feature correctly?
Regards, Adam Wight
I may not be understanding your question very well, but I this might help.
List items that come from different sources will be treated as separate lists in the editor (at least initially) even if they are rendered as a contiguous list in the final view. We may add some slick features to the editor to blend the native and generated portions of the document together better, but that will be something we work on adding down the road.
- Trevor
On Sat, Mar 24, 2012 at 10:09 AM, Adam Wight spam@ludd.net wrote:
I found this task in [[mw:Parsoid/Todo]]:
- Move list handler from tokenizer to sync23 phase token
transformer to support list items from templates.
Does this mean, using a template like {{Foreach|delim=*}} can generate some list items, and the calling page has control over whether these items are in their own list, or continue another list? In this case, the attached tests describe the feature correctly?
Regards, Adam Wight
Wikitext-l mailing list Wikitext-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitext-l
That makes sense. Sorry if that "Foreach" example was misleading, it was a more than a bit hackish. It's still tough for me to envision how this blending of lists will play out as wikitext, but I took a pass at implementing something like I characterized in those parser test cases. https://gerrit.wikimedia.org/r/3729
List items generated by a template are parsed as if the generated text had appeared in that same location.
One problem that jumps out right away is that the inner template would have to take into account the indentation level of its calling page.
Thanks, Adam
tparscal@wikimedia.org:
I may not be understanding your question very well, but I this might help.
List items that come from different sources will be treated as separate lists in the editor (at least initially) even if they are rendered as a contiguous list in the final view. We may add some slick features to the editor to blend the native and generated portions of the document together better, but that will be something we work on adding down the road.
- Trevor
On Sat, Mar 24, 2012 at 10:09 AM, Adam Wight spam@ludd.net wrote:
I found this task in [[mw:Parsoid/Todo]]:
- Move list handler from tokenizer to sync23 phase token
transformer to support list items from templates.
Does this mean, using a template like {{Foreach|delim=*}} can generate some list items, and the calling page has control over whether these items are in their own list, or continue another list? In this case, the attached tests describe the feature correctly?
Regards, Adam Wight
Wikitext-l mailing list Wikitext-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitext-l
Wikitext-l mailing list Wikitext-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitext-l
On 03/26/2012 05:31 PM, Trevor Parscal wrote:
I may not be understanding your question very well, but I this might help.
List items that come from different sources will be treated as separate lists in the editor (at least initially) even if they are rendered as a contiguous list in the final view. We may add some slick features to the editor to blend the native and generated portions of the document together better, but that will be something we work on adding down the road.
IMHO it would make sense to treat lists with items coming from templates similar to tables produced by table start / row / end templates- as something partially constructed from templates. We can mark both tables and lists as being composed from templates in the parser, which should make it quite easy to initially protect those lists as opaque blobs in the editor, until advanced support for mixed-source structures is implemented.
Gabriel
wikitext-l@lists.wikimedia.org