Currently the rendering for backlink markers to done differently in the legacy parser and Parsoid. That's why any changes to that system need to be implemented in two places.
We want to create code that can be used for both parsers so that we're also able to implement changes for Sub-referencing (product board) and the new backlink marker configurations easier.
Implementation details
- Extract the backlink parsing from the legacy parser.
- Make switchable between legacy and new backlinks.
- Provide an easy interface that can also be used in Parsoid code.
T384948: Implement explicit backlink markers for Parsoid comes in follow-up work.