club-1 / flarum-ext-cross-references

Add cross reference links when a discussion is mentioned from another one.
GNU Affero General Public License v3.0
6 stars 1 forks source link

Maybe implement manually created links detection with a TextFormatter tag filter #29

Open n-peugnet opened 1 year ago

n-peugnet commented 1 year ago

Same as #27, but at parsing time. See: https://s9etextformatter.readthedocs.io/Filters/Tag_filters/

This way we can detect that a links points to a discussion from the parsing step. This would allow to:

  1. limit the parsing logic code to a single place: Formatter\CrossReferencesConfigurator.php
  2. make this information available in JavaScript
  3. Simplify the PostEventListener logic.