You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking at this article about modifying markdown to recognise custom tags and render them as classes on HTML elements.
Would you be able to instruct on how/where I'd begin editing MacDown code to get this behaviour working? Even if it's not put in here as a feature, I could edit it on my copy. Thanks very much.
The text was updated successfully, but these errors were encountered:
The main problem of adding custom tags is that there is no consensus on how this can be done “correctly”. Patching the parsing program directly is far from ideal—it works when you write your own parser, but not for a all-in-one application.
MacDown does not use Markdown.pl like the article author, but a C implementation of the same speculation. The main difference between those two (aside from language) is that our implementation is based on text stream instead of regular expressions. This makes the parser a lot more performant and accurate, but the downside is that it is harder to customise. Namely, adding syntax rules anyway you like is nearly impossible (although it might be possible to add a “fallback” rule when no other applies).
But still, there is no consensus on how exactly this can be done, and with the community moving toward CommonMark, you might want to push it to standardise it; if CommonMark accepts it, everyone will feel comfortable implementing it.
Currently it’s difficult to modify the parser component in MacDown directly—you will need to fork Hoedown (i.e. the Markdown parser), patch it, host it in your own CocoaPods repository, and point MacDown to it instead of the official release. I do have plans on writing some instructions on this so that people can customise things more easily. I will report back when this is done.
I’m closing this because this probably won’t be touched in a while. But this is still a goal (although far away), and may be reopened in the future.
I was looking at this article about modifying markdown to recognise custom tags and render them as classes on HTML elements.
Would you be able to instruct on how/where I'd begin editing MacDown code to get this behaviour working? Even if it's not put in here as a feature, I could edit it on my copy. Thanks very much.
The text was updated successfully, but these errors were encountered: