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

Nesting a code block with table elements inside of a table cell results in incorrect rendering #465

Closed
KirkMunro opened this issue Nov 23, 2017 · 4 comments
Assignees
Labels

Comments

@KirkMunro
Copy link

Consider the following markdown:

|PowerShell command|Example|
|--|--|
|Get-Service|`Get-Service | Stop-Service -WhatIf`|

This renders incorrectly, with the second column in the first data row truncating after the pipe that is inside of the code block.

Please consider fixing this such that showdownjs ignores table pipe symbols inside of inline code blocks that are included in the markdown table.

Thank you.

@tivie tivie self-assigned this Nov 23, 2017
@tivie tivie added the bug label Nov 23, 2017
@tivie
Copy link
Member

tivie commented Nov 23, 2017

This is indeed a bug.

As a workaround, for now, you can escape the pipe char, like this:

|PowerShell command|Example|
|--|--|
|Get-Service| `Get-Service \| Stop-Service -WhatIf` |

Keep in mind though that github also fails properly parsing this:

PowerShell command Example
Get-Service `Get-Service

tivie added a commit that referenced this issue Nov 23, 2017
A code span with a pipe character no longer incorrectly breaks the cell table.

Closes #465
@tivie
Copy link
Member

tivie commented Nov 23, 2017

Should be fixed now in latest develop. Please give it a try and let me know.

Donate Click here to lend your support to: ShowdownJS website and testing platform and make a donation at pledgie.com

As you know, ShowdownJS is a free library and it will remain free forever. However, maintaining and improving the library costs time and money.
If you like our work and find our library useful, please donate through Pledgie or directly through paypal!! Your contribution will be greatly appreciated and help us continue to develop this awesome library.

@KirkMunro
Copy link
Author

Thank you. I'll give it a try next week (it's Thanksgiving/long weekend in the US, so I can't get the upgrade to the latest done until next week).

@KirkMunro
Copy link
Author

Actually scratch that, @ctsears did the upgrade already to get the fix for the issue he reported, and it's all working. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants