question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

remark-grid-table: not breakable spaces break the parsing

See original GitHub issue

given

+-----------+--------------------------------------------+
| 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:closed
  • Created 4 years ago
  • Comments:16 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
StaloneLabcommented, Jan 8, 2020

Will be working on it next week if no one has solved it by then.

0reactions
StaloneLabcommented, Jul 1, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found