Hacker News new | ask | show | jobs
by gritzko 26 days ago
About five years ago I faced the fact no two Markdown implementations are fully compatible. I made StrictMark[1], which is a backwards-compatible Markdown dialect with a formal grammar (I use Ragel for parser generation btw). Takes 5-10 min with LLMs to make any implementation, cause formal grammar is unchanged. I use it, no one else does, which is not an issue cause it is backwards-compatible. GitHub renders it fine[3].

Solved my problems. Caused no inconvenience.

[1]: https://web.archive.org/web/20210130000533/http://doc.replic...

[2]: https://github.com/gritzko/beagle-journal/blob/main/wiki/Str...

[3]: https://github.com/gritzko/beagle-journal/blob/main/wiki/Str...

2 comments

How does it compare to CommonMark, which I think was the first formally specified Markdown dialect?
CommonMark spec[1] is laaarge and not formal (no grammar). StrictMark has block-level[2] and inline[3] grammars, 100+ and 200+ lines of Ragel code respectively. May parse with regexes too, and results will be identical.

[1]: https://spec.commonmark.org/0.31.2/

[2]: https://github.com/gritzko/beagle/blob/main/dog/tok/MKDTB.c....

[3]: https://github.com/gritzko/beagle/blob/main/dog/tok/MKDT.c.r...

Genius! Love it! I'm going to plaster this everywhere!