Custom formatting for OSM tags in Discourse?

I’ve done some digging, and it does not look very complicated (if one already has test instance of Discourse running, of course, which seems like vast majority of the work).

The closest and simplest I could find is this abbreviation plugin (~100 lines of code and CSS combined) which seems to find certain acronyms from (setting it implements), and adds HTML <abbr> tags around them for explanation.

Which seems even more complex than we would need here (we don’t even need that settings preference)

This main part of code seems to be just several lines of code culminating in simple RegEx:

much of the rest of the code seems like common-to-reuse boilerplate for this case.

And the RegEx itself should be simple too, e.g. this for JS:

text = text.replace(new RegExp('{{key\\|([^}]+)}}','gi'), '<A HREF="https://wiki.openstreetmap.org/wiki/Key:$1">$1</A>');
text = text.replace(new RegExp('{{tag\\|([^|]+)\\|([^}]+)}}','gi'), '<A HREF="https://wiki.openstreetmap.org/wiki/Key:$1">$1</A>=<A HREF="https://wiki.openstreetmap.org/wiki/Tag:$1=$2">$2</A>');
other possible options

If one were to need more complex functionality, there is still relatively simple version of bbcode [which supports only bbcode color changes] at GitHub - discourse/discourse-bbcode-color: A Discourse Plugin to support BBCode color tags.

Or, if one were to want to start writing more complex plugin from scratch, there is GitHub - discourse/discourse-plugin-skeleton: Template for Discourse plugins