Add new unescaped_pipe_in_table_cell rustdoc lint#159583
Add new unescaped_pipe_in_table_cell rustdoc lint#159583GuillaumeGomez wants to merge 3 commits into
unescaped_pipe_in_table_cell rustdoc lint#159583Conversation
This comment has been minimized.
This comment has been minimized.
045f5a3 to
6fd9b1b
Compare
|
Applied comments. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
|
2nd try. Let's do an FCP.
|
|
@Urgau has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
| ```rust | ||
| //! | col1 | | ||
| //! | ---- | | ||
| //! | `code_with(|arg| arg)` | |
There was a problem hiding this comment.
Wow TIL that this is how GFM works. Very strange design...
There was a problem hiding this comment.
Yeah I was super confused as well.
|
|
||
| #[derive(Diagnostic)] | ||
| #[diag("table row has too many columns")] | ||
| #[help("to escape `|` characters in tables, add a `\\` before them like `\\|`")] |
There was a problem hiding this comment.
| #[help("to escape `|` characters in tables, add a `\\` before them like `\\|`")] | |
| #[help(r"to escape `|` characters in tables, add a `\` before them like `\|`")] |
There was a problem hiding this comment.
- Please add a test case for tables with fewer cells in a row than the head. I suppose it should be silent, but we want to make sure it doesn’t ICE or something.
| one | two |
|-|-|
| a |
| b- Please add test cases for tables that don’t have leading and trailing pipes. You’re parsing the table syntax, so you need to test these corner cases.
one | two
-|-
a | b | c
a |
*[View changes since the review](https://triagebot.infra.rust-lang.org/gh-changes-since/rust-lang/rust/159583/cde3f8aee5a30928872e2438e3f18238a3fa306c..6fd9b1bce2dd4cd99e32dc333104810bef776cc0)*| //! | col | | ||
| //! | ---- | | ||
| //! | code_with | aaaaa | ||
| //^ the "aaaaa" part will be ignored. |
There was a problem hiding this comment.
Why is it ignored? It seems like an example of the thing you’re trying to warn about.
col code_with
|
Minor nits about the implementation, but massive approval for the lint in concept! |
Fixes #159186.
r? @Urgau