Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ivi104 opened this issue Mar 6, 2024 · 1 comment

Comments

@Ivi104
Copy link

Ivi104 commented Mar 6, 2024

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
Copy link
Author

Ivi104 commented Mar 7, 2024

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"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant