Is Markdown easily replaceable in a fork?


(Joel C. Salomon) #1

How deeply embedded into the assumptions of Discourse is it that the input language is Markdown? If an installation wanted to use AsciiDoc, for instance, would anything more be required than to maintain a fork where the Markdown translator was replaced with an AsciiDoc one?


(Robin Ward) #2

It is not easy at all to swap in another parser right now. We have it on our schedule to replace the markdown parser with a Commonmark compatible parser soon and I anticipate it will be very difficult as we have a look of hooks in there (oneboxes, polls, emoji, etc.) Additionally, we use our own parser to format things like welcome messages – those would break.

We do support additional formatters though, although it is pretty rough around the edges. We use it when content is imported from other sites – sometimes we can’t convert it to markdown so we mark the cook_method as regular, html or email. You could potentially add another method for ascii_doc and use your parser when that it is set, but it will be a challenging plugin to write :smile: