XZise added a subscriber: XZise. XZise added a comment.
Using mwparserfromhell is not that complicated to include (but unfortunately I don't use compat so I wouldn't be able to test it). Instead of `process_children` the complete text is parsed and then filtered for links using [[http://mwparserfromhell.readthedocs.org/en/latest/api/mwparserfromhell.html#...]] (afaik it's not important for patrol.py that the link is a children of something). So in [[http://git.wikimedia.org/blob/pywikibot%2Fcompat.git/master/patrol.py#L225%7... 225 and 226]] it's:
``` for link in mwparserfromhell.parse(wikitext).filter_wikilinks(): process_node(link, None) ```
Then `process_node` need to use pywikibot's Link (again I don't know how it works in compat) to parse the text from `link.title` to determine namespace and page title. This would also interpret interwiki links correctly. So if in `process_node` it sets `obj = pywikibot.Link(obj.title, self.site)` it's `obj.title` instead of `obj.target`. The ifs in lines 171 to 173 could be removed as well as the complete else block and `process_children`.
TASK DETAIL https://phabricator.wikimedia.org/T71980
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: XZise Cc: pywikipedia-bugs, Ricordisamoa, jayvdb, XZise
pywikipedia-bugs@lists.wikimedia.org