Skip to content

Pipe character in rustdoc markdown tables can not be escaped #27862

Closed
@m4rw3r

Description

@m4rw3r

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:

Test  | Table
------|-----------
t = b | id = |x| x

This causes only f = to be rendered in the right cell instead of the expected f = |x| x.

Looking at Hoedown it seems like they fixed this in commit hoedown/hoedown@e7bcbe3 , which would enable us to write this:

Test  | Table
------|-------------
t = b | id = \|x\| x

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions