Skip to content
New issue

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

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

Already on GitHub? # to your account

backtick escaping inside a table seems to break the table #746

Open
hartman opened this issue Jul 11, 2019 · 3 comments
Open

backtick escaping inside a table seems to break the table #746

hartman opened this issue Jul 11, 2019 · 3 comments
Labels

Comments

@hartman
Copy link

hartman commented Jul 11, 2019

Take the following markdown

| Formatting         | Symbol                   | Example                              |
| ------------------ | ------------------------ | ------------------------------------ |
| `Code`             | Three backticks \`\`\` | \`\`\`print 'Hello World';\`\`\`     |

In the first cell I want inline code markup, in the second cell, i want three escaped backticks, and in the third i want a pair of three escaped markdowns. As can be seen in the screenshot, made using https://parsedown.org/extra/ this breaks the table..
Screenshot 2019-07-11 at 14 03 51

I couldn't find a way around it either.

Oh the irony of documenting a markdown flavour and finding an issue in a markdown parser which you then have to report using markdown escaped inside markdown ;)

@taufik-nurrohman
Copy link

Wrap in <code> tags:

| `Code` | Three backticks ` ``` ` | ` ```print 'Hello World';``` ` |

@hartman
Copy link
Author

hartman commented Jul 11, 2019

but then i have code formatting highlighting that content, which isn't desirable. ;)

@taufik-nurrohman
Copy link

Use HTML entities:

| `Code` | Three backticks &#96;&#96;&#96; | &#96;&#96;&#96;print 'Hello World';&#96;&#96;&#96; |

@aidantwoods aidantwoods transferred this issue from erusev/parsedown-extra Dec 31, 2019
MaximBobylev added a commit to MaximBobylev/parsedown that referenced this issue Dec 29, 2021
The problem described in the the issue could be simplified to parsing error in case of the following table
```
| header1 | header2 |
| --- | --- |
| \`\`\`a\`\`\` | \`\`\`b\`\`\` |
```
Instead of parsing values A and B into separate columns, these values are being concatinated into first column. PR adds one alternative into column value regex, which provides correct parsing of triple backtics
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants