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
--- parserTests.txt
+++ parserTests.txt
@@ -59,6 +59,12 @@
* [[File:Bad.jpg]] except [[Nasty page]]
!!endarticle
+!! article
+Template:inner list item
+!! text
+* item 1
+!! endarticle
+
###
### Basic tests
###
@@ -9185,6 +9191,58
!! end
+!! test
+List items from template, preceding
+!! input
+{{inner list}}
+* item 2
+!! result
+<ul><li> item 1
+</li><li> item 2
+</li></ul>
+!! end
+
+!! test
+List items from template, inline
+!! input
+* item 0
+{{inner list}}
+* item 2
+!! result
+<ul><li> item 0
+</li><li> item 1
+</li><li> item 2
+</li></ul>
+!! end
+
+!! test
+List items from template, continuing
+!! input
+* item 0
+{{inner list}}
+!! result
+<ul><li> item 0
+</li><li> item 1
+</li></ul>
+!! end
+
+!! test
+List items from template, broken by linefeeds
+!! input
+* item 0
+
+{{inner list}}
+
+* item 2
+!! result
+<ul><li> item 0
+</li></ul>
+<ul><li> item 1
+</li></ul>
+<ul><li> item 2
+</li></ul>
+!! end
+
TODO:
more images
_______________________________________________
Wikitext-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitext-l