-
Notifications
You must be signed in to change notification settings - Fork 115
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
Problem rendering pipe characters in code blocks within tables #85
Comments
@huettenhain, thanks for the report. It looks like the GFM's approach seems to be even somewhat in-line with the CommonMark specification (https://spec.commonmark.org/0.30/#precedence). So I would go their way, i. e. to enable to escape
What do you think? It would be great to have some feedback before starting with the implementation. |
That seems perfectly reasonable to me, and I should add that I am very happy and grateful to see this nice library brought to life again. |
OK, thank you for your feedback, I think I will look at this next week then.
Yes, I was given write permissions by @miyuchina who seems to like my contributions, so hopefully I can bring the library a little bit further, even though it may have lost some users in the previous years. I take it as a challenge. :) |
Just looking at this. I have some interesting findings:
So no change in the direction of this issue actually. I'm only re-classifying it: it is probably not a bug, but rather an enhancement. |
Another finding: It looks like even GitHub is not handling this edge case: |a|b|
|-|-|
|ending with slash: \\|other cell| This results in just one cell in the row:
Of course, users will hopefully never do something like that. So I wouldn't implement handling of this edge case now. It would probably require using something more complicated than a simple row-string split (which just checks for any |
@huettenhain, so I prepared the implementation in a dedicated branch. Can you please check it out, together with my notes above? |
close: I merged the branch, enjoy and feel free to reopen in case of any problems. |
Ah, I am so sorry, I just couldn't get to this. I think this is a good way to proceed, I will let you know if any problems arise. |
No problem, thank you. 👍 |
Hello, thank you heartily for this great library. It took me quite few months to encounter a bug, which I am reporting here.
Mistletoe seems unable to render pipe characters in code blocks within tables. Here is an example of observed behavior:
The following was my expected rendering:
<|>
<|>
Interestingly, this behavior can not be expected in GFM, which requires escapes for pipes: github/markup#1078
However, escaping pipes is not working in mistletoe:
The text was updated successfully, but these errors were encountered: