siddharthvp/mwn

wikitext.parseTemplates() does not ignore comments before the first parameter

Opened this issue · 1 comments

Ivi104 commented

Wikitext of [[:en:Greg Egan]]:

{{Infobox writer <!-- for more information see [[:Template:Infobox writer/doc]] -->
| name        = Greg Egan
...

Mwn will list the following template names on the above page: Short description, Infobox writer <!-- for more information see [[:Template:Infobox writer/doc]] -->, Cite journal, Cite web, ...

Ivi104 commented

Another similar example, this time in parameters:
Wikitext of [[:en:Ben Bova]]:

{{Infobox writer
...
| <!-- website = {{URL|benbova.net}} - not working -->
}}

Mwn parses the last parameter as:

{
	"name": "<!-- website",
	"value": "{{URL|benbova.net}} - not working -->",
	"wikitext": "| <!-- website = {{URL|benbova.net}} - not working -->\n"
}