# \[JS\] micromark — a new way to parse Markdown

**URL:** <https://talk.commonmark.org/t/js-micromark-a-new-way-to-parse-markdown/3634>\
**Category:** Implementation\
**Created:** [September 16, 2020, 5:46pm UTC](https://talk.commonmark.org/t/js-micromark-a-new-way-to-parse-markdown/3634 "2020-09-16T17:46:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zamfofex](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/zamfofex/32/2148_2.png) [@zamfofex](https://talk.commonmark.org/u/zamfofex)\
**Post date:** [September 16, 2020, 5:46pm UTC](https://talk.commonmark.org/t/js-micromark-a-new-way-to-parse-markdown/3634/1 "2020-09-16T17:46:13Z")

</div>

Hello! I wanted to be able to mention (for anyone that might be interested) that [micromark](https://github.com/micromark/micromark) has recently reached a working state. 🎉

In case you haven’t heard of micromark, it is a [unified](https://unifiedjs.com) 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](https://github.com/micromark/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](https://html.spec.whatwg.org/multipage/).

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!

---

<div class="post-metadata">

**Author:** ![jgm](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/jgm/32/1360_2.png) [@jgm](https://talk.commonmark.org/u/jgm)\
**Post date:** [September 16, 2020, 10:53pm UTC](https://talk.commonmark.org/t/js-micromark-a-new-way-to-parse-markdown/3634/2 "2020-09-16T22:53:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![digitalmoksha](https://cdn.commonmark.org/letter_avatar_proxy/v2/letter/d/53a042/32.png) [@digitalmoksha](https://talk.commonmark.org/u/digitalmoksha)\
**Post date:** [September 18, 2020, 7:48pm UTC](https://talk.commonmark.org/t/js-micromark-a-new-way-to-parse-markdown/3634/3 "2020-09-18T19:48:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bagginstyrone](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/bagginstyrone/32/2231_2.png) [@bagginstyrone](https://talk.commonmark.org/u/bagginstyrone)\
**Post date:** [April 23, 2021, 4:53am UTC](https://talk.commonmark.org/t/js-micromark-a-new-way-to-parse-markdown/3634/4 "2021-04-23T04:53:11Z")

</div>

@zamfofex I think it’s cool it don’t ever notice it. I should read your post carefully. You always shares informative posts. 🙂
