These are chat archives for wooorm/remark

Aug 2017
David Clark
Aug 03 2017 02:16
@wooorm :wave: i want to parse a markdown document and end up with a hierarchical data structure representing the document's headings. like mdast-util-toc except generating a simple data structure, not mdast nodes. i'm wondering if you know of a tool like this (before i write my own).
Aug 03 2017 14:10
Well, you could use mdast-util-toc
It still gives you nodes back
But a subset of nodes (list, list-items, and paragraphs)
So it is a “hierarchical data structure”
(oh lol, just saw you already mentioned it, sorry for not reading 😬)
You could also use mdast-util-to-string to change those paragraphs back into a string