{"action":"created","issue":{"url":"https://api.github.com/repos/earwig/mwparserfromhell/issues/142","repository_url":"https://api.github.com/repos/earwig/mwparserfromhell","labels_url":"https://api.github.com/repos/earwig/mwparserfromhell/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/earwig/mwparserfromhell/issues/142/comments","events_url":"https://api.github.com/repos/earwig/mwparserfromhell/issues/142/events","html_url":"https://github.com/earwig/mwparserfromhell/issues/142","id":131107372,"number":142,"title":"template is interpreted as a text node if the order of its parameters is altered","user":{"login":"hgaleote","id":17050621,"avatar_url":"https://avatars.githubusercontent.com/u/17050621?v=3","gravatar_id":"","url":"https://api.github.com/users/hgaleote","html_url":"https://github.com/hgaleote","followers_url":"https://api.github.com/users/hgaleote/followers","following_url":"https://api.github.com/users/hgaleote/following{/other_user}","gists_url":"https://api.github.com/users/hgaleote/gists{/gist_id}","starred_url":"https://api.github.com/users/hgaleote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgaleote/subscriptions","organizations_url":"https://api.github.com/users/hgaleote/orgs","repos_url":"https://api.github.com/users/hgaleote/repos","events_url":"https://api.github.com/users/hgaleote/events{/privacy}","received_events_url":"https://api.github.com/users/hgaleote/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/earwig/mwparserfromhell/labels/aspect:%20parser","name":"aspect: parser","color":"33EEAA"}],"state":"open","locked":false,"assignee":{"login":"earwig","id":637235,"avatar_url":"https://avatars.githubusercontent.com/u/637235?v=3","gravatar_id":"","url":"https://api.github.com/users/earwig","html_url":"https://github.com/earwig","followers_url":"https://api.github.com/users/earwig/followers","following_url":"https://api.github.com/users/earwig/following{/other_user}","gists_url":"https://api.github.com/users/earwig/gists{/gist_id}","starred_url":"https://api.github.com/users/earwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/earwig/subscriptions","organizations_url":"https://api.github.com/users/earwig/orgs","repos_url":"https://api.github.com/users/earwig/repos","events_url":"https://api.github.com/users/earwig/events{/privacy}","received_events_url":"https://api.github.com/users/earwig/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/earwig/mwparserfromhell/milestones/8","html_url":"https://github.com/earwig/mwparserfromhell/milestones/version%200.5","labels_url":"https://api.github.com/repos/earwig/mwparserfromhell/milestones/8/labels","id":1127195,"number":8,"title":"version 0.5","description":"Final easy-ish additions before the version 1.0 overhaul, including remaining node types (redirects) and other optimizations/fixes.","creator":{"login":"earwig","id":637235,"avatar_url":"https://avatars.githubusercontent.com/u/637235?v=3","gravatar_id":"","url":"https://api.github.com/users/earwig","html_url":"https://github.com/earwig","followers_url":"https://api.github.com/users/earwig/followers","following_url":"https://api.github.com/users/earwig/following{/other_user}","gists_url":"https://api.github.com/users/earwig/gists{/gist_id}","starred_url":"https://api.github.com/users/earwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/earwig/subscriptions","organizations_url":"https://api.github.com/users/earwig/orgs","repos_url":"https://api.github.com/users/earwig/repos","events_url":"https://api.github.com/users/earwig/events{/privacy}","received_events_url":"https://api.github.com/users/earwig/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":1,"state":"open","created_at":"2015-05-23T23:35:39Z","updated_at":"2016-02-03T18:23:19Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-02-03T18:08:28Z","updated_at":"2016-02-05T00:12:07Z","closed_at":null,"body":"First of all, my compliments and gratitude for such a great tool.\r\n\r\nWhen parsing the following code, the first node is not recognised as a template:\r\n\r\n```mediawiki\r\n{{l+|{{if|{{{tilde|}}}|-|--}}{{{3}}}|tr={{{tr2|}}}}}\r\n```\r\n\r\n```python3\r\n>>> mwparserfromhell.__version__\r\n'0.4.3'\r\n>>> tree = mwparserfromhell.parse(\"{{l+|{{if|{{{tilde|}}}|-|--}}{{{3}}}|tr={{{tr2|}}}}}\")\r\n>>> [(type(x), x) for x in tree.nodes]\r\n[(mwparserfromhell.nodes.text.Text, '{{l+|'),\r\n (mwparserfromhell.nodes.template.Template, '{{if|{{{tilde|}}}|-|--}}'),\r\n (mwparserfromhell.nodes.argument.Argument, '{{{3}}}'),\r\n (mwparserfromhell.nodes.text.Text, '|tr='),\r\n (mwparserfromhell.nodes.argument.Argument, '{{{tr2|}}}'),\r\n (mwparserfromhell.nodes.text.Text, '}}')]\r\n```\r\n\r\nHowever, after swapping the position of parameters, the outcome is as expected:\r\n\r\n```mediawiki\r\n{{l+|tr={{{tr2|}}}|{{if|{{{tilde|}}}|-|--}}{{{3}}}}}\r\n```\r\n\r\n```python3\r\n>>> tree = mwparserfromhell.parse(\"{{l+|tr={{{tr2|}}}|{{if|{{{tilde|}}}|-|--}}{{{3}}}}}\")\r\n>>> [(type(x), x) for x in tree.nodes]\r\n[(mwparserfromhell.nodes.template.Template,\r\n  '{{l+|tr={{{tr2|}}}|{{if|{{{tilde|}}}|-|--}}{{{3}}}}}')]\r\n```\r\n\r\nI have tested the issue in python versions 2.7.9 and 3.4.3"},"comment":{"url":"https://api.github.com/repos/earwig/mwparserfromhell/issues/comments/180116608","html_url":"https://github.com/earwig/mwparserfromhell/issues/142#issuecomment-180116608","issue_url":"https://api.github.com/repos/earwig/mwparserfromhell/issues/142","id":180116608,"user":{"login":"earwig","id":637235,"avatar_url":"https://avatars.githubusercontent.com/u/637235?v=3","gravatar_id":"","url":"https://api.github.com/users/earwig","html_url":"https://github.com/earwig","followers_url":"https://api.github.com/users/earwig/followers","following_url":"https://api.github.com/users/earwig/following{/other_user}","gists_url":"https://api.github.com/users/earwig/gists{/gist_id}","starred_url":"https://api.github.com/users/earwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/earwig/subscriptions","organizations_url":"https://api.github.com/users/earwig/orgs","repos_url":"https://api.github.com/users/earwig/repos","events_url":"https://api.github.com/users/earwig/events{/privacy}","received_events_url":"https://api.github.com/users/earwig/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T00:12:07Z","updated_at":"2016-02-05T00:12:07Z","body":"It definitely is a valid issue, I just haven't had a chance to work on a fix yet!"}}