remark-grid-table: not breakable spaces break the parsing
See original GitHub issuegiven
+-----------+--------------------------------------------+
| a | b |
+-----------+--------------------------------------------+
| c | e |
+-----------+--------------------------------------------+
I expect
root[1] (1:1-5:59, 0-295)
└─ element[2] (1:1-5:59, 0-295) [tagName="WrapperBlock"]
├─ gridTable[1] [data={"hName":"table"}]
│ └─ tableHeader[1] [data={"hName":"tbody"}]
│ └─ tableRow[2] [data={"hName":"tr"}]
│ ├─ tableCell[1] [data={"hName":"td","hProperties":{"colspan":1,"rowspan":1}}]
│ │ └─ paragraph[1] (1:1-1:2, 0-1)
│ │ └─ text: "a" (1:1-1:2, 0-1)
│ └─ tableCell[1] [data={"hName":"td","hProperties":{"colspan":1,"rowspan":1}}]
│ └─ paragraph[1] (1:1-1:2, 0-1)
│ └─ text: "b" (1:1-1:2, 0-1)
└─ paragraph[1] (1:1-2:59, 0-117)
└─ text: "| c | e |\n+-----------+--------------------------------------------+" (1:1-2:59, 0-117)
But I get
root[1] (1:1-5:59, 0-294)
└─ element[1] (1:1-5:59, 0-294) [tagName="WrapperBlock"]
└─ gridTable[1] [data={"hName":"table"}]
└─ tableHeader[2] [data={"hName":"tbody"}]
├─ tableRow[2] [data={"hName":"tr"}]
│ ├─ tableCell[1] [data={"hName":"td","hProperties":{"colspan":1,"rowspan":1}}]
│ │ └─ paragraph[1] (1:1-1:2, 0-1)
│ │ └─ text: "a" (1:1-1:2, 0-1)
│ └─ tableCell[1] [data={"hName":"td","hProperties":{"colspan":1,"rowspan":1}}]
│ └─ paragraph[1] (1:1-1:2, 0-1)
│ └─ text: "b" (1:1-1:2, 0-1)
└─ tableRow[2] [data={"hName":"tr"}]
├─ tableCell[1] [data={"hName":"td","hProperties":{"colspan":1,"rowspan":1}}]
│ └─ paragraph[1] (1:1-1:2, 0-1)
│ └─ text: "c" (1:1-1:2, 0-1)
└─ tableCell[1] [data={"hName":"td","hProperties":{"colspan":1,"rowspan":1}}]
└─ paragraph[1] (1:1-1:2, 0-1)
└─ text: "e" (1:1-1:2, 0-1)
extra
there are some special chars on the second row :
>>> a="""| c | e |"""
>>> a
'| c | \xe2\x80\x8c e |'
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (14 by maintainers)
Top Results From Across the Web
remarkjs/remark-breaks: plugin to add break support ... - GitHub
Support hard breaks without needing spaces or escapes (turns enters into <br> s). There are no options. Syntax. This plugin looks for markdown...
Read more >Support tables in remark - unified
How to support tables in remark. Tables are a non-standard feature in markdown: they are not defined in CommonMark and will not work...
Read more >gatsby-remark-grid-tables
gatsby-remark-grid-tables This plugin parses custom Markdown syntax to describe tables. It just includes this package in the gatsby-remark…
Read more >Madoko Reference
If you escape a space ( \ ), it is translated as a non-breakable space, while a backslash at the end of a...
Read more >gatsby-remark-grid-tables not working anymore - Reddit
Ever since I upgraded to gatsby v4 the gatsby-remark-grid-tables package ... require('unified') const remarkParse = require('remark-parse') ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Will be working on it next week if no one has solved it by then.
To me, your first usage is incorrect; we simply allowed it because it was easier for Unicode manipulation of varying-width characters; this is not a bug, and could hardly argue this is a great feature request…
Right now, I’m against having this kind of character that would complexify the parsing (already way too complex). Tables are expected to be written correctly, and your first example is behaviour undefined, maybe one day it’ll render the other way around, no one knows 'cause no one is expected to write this kind of stuff.