Page MenuHomePhabricator

migrate textlib parser functionality to mwparserfromhell
Closed, DeclinedPublic

Description

textlib contains a lot of parsing functionality, built using regex. This usually works well, however it becomes complicated / error prone especially with nested templates.

However, as mwparserfromhell tokenizer doesn't expose start & end of each token, the textlib algorithms will need to be heavily revised, or mwparserfromhell needs improvements.

Event Timeline

jayvdb raised the priority of this task from to Medium.
jayvdb updated the task description. (Show Details)
jayvdb added subscribers: Xqt, Earwig, Ricordisamoa and 3 others.
Ricordisamoa updated the task description. (Show Details)
Ricordisamoa set Security to None.

Also reflinks.py

I’ve declined this task after ten years because:

  • Pywikibot currently uses both mwparserfromhell and wikitextparser packages. There is no preference for one over the other.
  • The task does not describe which concrete textlib functions or behaviours should be migrated. Without a clear specification, the scope is undefined and cannot be meaningfully evaluated.
  • Any migration would therefore require a feature request or upstream change to mwparserfromhell or wikitextparser as well.
  • A migration of non-trivial textlib parts would be a major redesign of stable code. Such a change requires a detailed proposal, justification, and upstream support before it can be considered.