Hi,
I’m looking for some high-level guidance on approach to building a link formatting plugin.
The plugin should automatically display links to a particular web resource (matching a given regular expression) as a button.
Essentially, when someone includes a URL in a post matching a specific pattern, like this:
http://mysite.domain/specific/path/
…the post should appear as if they had used the following markdown:
[![Foo](my-button.png)](http://mysite.domain/specific/path)
I’m not sure at what point in the code I should be performing my link identification RegEx and modifying the output.
Should I be doing this through a…
- Dialect?
- Linkify rules extension/schema?
- Markdown-it text replacement?
(md.core.textPostProcess.ruler) - Nokogiri link extraction and modification?
Appreciate if someone could point me in the right direction.
Thanks
Sam