Open iFreilicht opened 1 year ago
I did a bit more research and found out this is actually a known problem in pulldown-cmark since 2019, see pulldown-cmark#356. Not sure if this should stay open since it's a problem in mdbook that requires updating a dependency (once the bug is fixed there).
It probably doesn't hurt to keep this open, but yea it is blocked on https://github.com/raphlinus/pulldown-cmark/issues/356.
Yes, this has always been a problem. It is impossible to put a `|`
inside a table.
The work around is to use <code></code>
tags.
| This is <code>\|</code>|
Problem
This was discovered in NixOS/nix#7770
We have a table with all operators, but
||
doesn't get rendered correctly:I thought that maybe removing the
\
from the markdown would solve this, but no. Comparing a few types of spans:The documentation claims that tables are implemented according to the GFM tables extension.
However, this is not the case. From the GFM spec, Example 200:
Steps
chapter_1.md
:Possible Solution(s)
It seems mdbook treats the code span as a self-contained unit, so
\|
does not have special meaning inside the table as it should.While IMO it would be more intuitive to just have the non-escaped pipe symbol work inside code spans, adhering to the GFM spec would be best in terms of compatibility, so that's what I'd suggest.
Notes
In the end, this minimal markdown
should produce this HTML
While right now it produces this:
Version