Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remark add extra slash when there is \ in table #295

Closed
wsdjeg opened this issue Sep 6, 2017 · 0 comments · Fixed by #420
Closed

remark add extra slash when there is \ in table #295

wsdjeg opened this issue Sep 6, 2017 · 0 comments · Fixed by #420
Labels
remark-stringify 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem

Comments

@wsdjeg
Copy link

wsdjeg commented Sep 6, 2017

here is the md file:

| aa | bb | cc |
| -- | -- | -- |
| dd | ee / `\` | ff |

after run remark --no-color test.md

you will see

| aa  | bb     | cc  |
| --- | ---------- | --- |
| dd  | ee / `\` \| ff |     |

but I think it should be

| aa  | bb       | cc  |
| --- | -------- | --- |
| dd  | ee / `\` | ff  |
@wooorm wooorm added 🐛 type/bug This is a problem needs pr 👶 semver/patch This is a backwards-compatible fix remark-stringify labels Sep 6, 2017
wooorm added a commit that referenced this issue Jul 11, 2019
Related to GH-73.
Related to GH-83.
Closes GH-295.
Closes GH-320.
Closes GH-396.
wooorm added a commit that referenced this issue Jul 11, 2019
Previously, inline code got preference over the table cell itself.
This was added due to GH-73 in GH-83 four years ago.

That behaviour does not match current GFM and lead to unexpected results in
GH-295, GH-320, and GH-396.

**This PR fixes them, but introduces a conundrum: GFM does not allow empty
inline code in cells. Which is weird. Should we support that (why not? 🤷) or
match GFM?**

Related to GH-73.
Related to GH-83.
Closes GH-295.
Closes GH-320.
Closes GH-396.
@wooorm wooorm added has pr and removed needs pr labels Jul 15, 2019
wooorm added a commit that referenced this issue Jul 19, 2019
Previously, inline code got preference over the table cell itself.
This was added due to GH-73 in GH-83 four years ago.

That behaviour does not match current GFM and lead to unexpected results in
GH-295, GH-320, and GH-396.

**This PR fixes them, but introduces a conundrum: GFM does not allow empty
inline code in cells. Which is weird. Should we support that (why not? 🤷) or
match GFM?**

Related to GH-73.
Related to GH-83.
Closes GH-295.
Closes GH-320.
Closes GH-396.
wooorm added a commit that referenced this issue Jul 19, 2019
Fix inline code and code in tables

This removes support for empty inline code, and only trims inline code content
by one character on both sides, if both the initial and final character are a
space or a line feed.

Previously, inline code got preference over the table cell itself.
This was added due to GH-73 in GH-83 four years ago.

That behaviour does not match current GFM and lead to unexpected results in
GH-295, GH-320, and GH-396.

Related to GH-73.
Related to GH-83.
Closes GH-295.
Closes GH-320.
Closes GH-396.
Closes GH-420.

Reviewed-by: Merlijn Vos <merlijn@soverin.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
remark-stringify 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging a pull request may close this issue.

2 participants