syntax-tree / mdast

Markdown Abstract Syntax Tree format
https://unifiedjs.com
1.1k stars 45 forks source link

Incorrectly eaten value #11

Closed b-ryan closed 8 years ago

b-ryan commented 8 years ago

I'm using doctoc to generate a table of contents for my readme. I received this error:

DocToccing single file "README.md" for github.com.

==================

/home/buck/src/RJMetrics/connections-service/node_modules/doctoc/node_modules/markdown-to-ast/node_modules/mdast/node_modules/vfile/index.js:541
        throw err;
              ^
74:11: Incorrectly eaten value: please report this warning on http://git.io/vUYWz

I tracked it down to the way a table was formatted:

| |God|Admin|Standard|
|---|---|---|---|
|GET|x|x| |
|PUT|x|x| |
|POST|x|x| |

It seems to not like the empty table values. Upon changing it to

| |God|Admin|Standard|
|---|---|---|---|
|GET|x|x|-|
|PUT|x|x|-|
|POST|x|x|-|

the error is gone

wooorm commented 8 years ago

Thanks for mentioning, however, the problem is doctoc, as it’s using an old version of mdast (renamed to remark). See https://github.com/thlorenz/doctoc/issues/94 for more information.

b-ryan commented 8 years ago

thanks :+1: