-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Pipe character in rustdoc markdown tables can not be escaped #27862
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
Comments
I think all we probably need to do here is update the hoedown submodule and double-check the FFI bindings didn't change, other than that it should just work after that! |
Some hoedown FFI changes: - `HOEDOWN_EXT_NO_INTRA_EMPHASIS` constant changed. - Updated/tidied up all callback function signatures. - All opaque data access has an additional layer of indirection for some reason (`hoedown_renderer_data`). This also fixes #27862.
In 2023, I seem still to experience this issue. |
I just encountered this as well, which confused me, as it is mentioned in the rustdoc book |
Correction. In my case, it rendered incorrectly due to Issue: pulldown-cmark/pulldown-cmark#656 E.g. if I had the following doc comment: //! Foo
//!
//! | A | B |
//! |---|---|
//! | 1 | 2 |
Then the table renders correctly: However, if the table is indented, then it renders as plain text. This can occur if another line is not indented correctly, e.g.: //!Foo
//!
//! | A | B |
//! |---|---|
//! | 1 | 2 |
Notice how |
Attempting to use the pipe symbol in tables in doc-comments does not work as it will be interpreted as a table-separator even when attempting to escape it. Attempts to use html-entities also fails (ie.
|
) and they end up escaped.Example:
This causes only
f =
to be rendered in the right cell instead of the expectedf = |x| x
.Looking at Hoedown it seems like they fixed this in commit hoedown/hoedown@e7bcbe3 , which would enable us to write this:
The text was updated successfully, but these errors were encountered: