Introduce WikiLinkParser

Authored by thiemowmde on May 3 2019, 2:36 PM.

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.


Introduce WikiLinkParser

This class uses the visitor pattern. We know we need at least two steps
when we want to clean wiki links:

  • De-localize namespace names.
  • Add the interwiki prefix to point back to the source wiki, depending on the namespace.

We are not sure yet what the order of these steps should be. The visitor
pattern is not only good for performance reasons (no need to parse the
wikitext two times), it allows to easily change the order any time.

Bug: T198584
Bug: T213821
Change-Id: I34a6b388242c01eee4c8fe0e529a5a84a057ae62


thiemowmdeMay 3 2019, 2:43 PM

Commit No Longer Exists

This commit no longer exists in the repository.