-
Notifications
You must be signed in to change notification settings - Fork 3
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
Date header not parsed with socklist template #212
Comments
@roysmith I will look closer at this shortly, but just off the bat, I don't thing mwparserfromhell distinguishes between |
As far as I can tell, mwparserfromhell doesn't provide a way to iterate over just the positional parameters; you need to look at the parameter name and see if its an integer. Maybe I'm just missing something in the API? |
explicit numeric names, i.e. {{socklist|1=user1|2=user2}}.
Fixed in 664371f |
@roysmith >>> text = "{{foo|bar|2=baz}}"
>>> template = mwparserfromhell.parse(text).filter_templates()[0]
>>> [i.name for i in template.params]
['1', '2'] So to see if a param is positional, I'd think all you need to do is check whether |
I had forgotten about isdigit(). What I did works, but isdigit() would have made it simpler. |
Wikipedia:Sockpuppet investigations/Tounom
23 February 2022 is missing.
The text was updated successfully, but these errors were encountered: