syntax-tree / mdast-util-to-markdown

mdast utility to serialize markdown
http://unifiedjs.com
MIT License
100 stars 20 forks source link

Error serializing `Table` nodes #1

Closed chrisrzhou closed 4 years ago

chrisrzhou commented 4 years ago

Error serializing Table nodes

When providing a Table node to serialize, we get an error of not being able to handle the table node.

Env

Repro

Try any Table node. The codesandbox uses an example table node from the mdast docs. https://codesandbox.io/s/gifted-butterfly-yxnzx?file=/src/index.js

Expected behavior

Should serialize mdast Table node without error

Actual behavior

Error thrown with Cannot handle unknown node table

wooorm commented 4 years ago

Tables is a GFM feature. I’m currently working on adding syntax extensions based on micromark to these newer projects. This extension would be in mdast-util-gfm-table or so.

chrisrzhou commented 4 years ago

Makes sense!

wooorm commented 4 years ago

done: https://github.com/syntax-tree/mdast-util-gfm-table

chrisrzhou commented 4 years ago

Thank you and looks like you are intending to support https://github.com/syntax-tree/mdast-util-gfm soon! Awesome sauce!

wooorm commented 4 years ago

Soooon!

JounQin commented 3 years ago

Is this worth for documentation? I just waste a few minutes for it. 🤣

And also remark-stringify.