[JS] micromark — a new way to parse Markdown

Hello! I wanted to be able to mention (for anyone that might be interested) that micromark has recently reached a working state. :tada:

In case you haven’t heard of micromark, it is a unified project, and it implements the CommonMark spec.

In addition, it does not produce an AST (at least not directly), but, rather, it tokenizes the input string using a state machine.

Accompanying it, there is a related project, the Common Markup State Machine, which specifies CommonMark’s syntax using a state machine, which is the same mechanism used to specify HTML syntax in the WhatWG spec.

In effect, besides being small and fast, it allows for people to know where each kind of token starts and ends in the input string, which makes it easy to write CommonMark compliant Markdown text editors! (I.e. ones that highlight the text you’re writing, without an additional pane for rendering.)

Also, note: I’m not associated with unified or micromark in any way other than just knowing about it and appreciating their efforts.

I hope other people find it neat too!


I wasn’t aware of this, but thanks for the notice. It looks very interesting!


Oh this looks cool, thanks for mentioning it @zamfofex!

1 Like