-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc fails to treat pipe character inside code blocks properly #28251
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
This seems to be a bug with hoedown itself, I get the same output without using rustdoc: $ cat test.md
Test | Table
------|-------------
t = b | `x \| y \| z`
$ ./hoedown --tables test.md
<table>
<thead>
<tr>
<th>Test</th>
<th>Table</th>
</tr>
</thead>
<tbody>
<tr>
<td>t = b</td>
<td>`x \</td>
</tr>
</tbody>
</table> |
Reportedly fixed in 3.0.5 which was just released. See hoedown/hoedown#169 . @eljay can you confirm the fix works? I haven't setup hoedown. |
That was fast, seems to be fixed: $ ./hoedown -v
Built with Hoedown 3.0.5.
$ ./hoedown --tables test.md
<table>
<thead>
<tr>
<th>Test</th>
<th>Table</th>
</tr>
</thead>
<tbody>
<tr>
<td>t = b</td>
<td><code>x \| y \| z</code></td>
</tr>
</tbody>
</table> @alexcrichton Before I submit a PR for this, is there any reason for the rust-lang/hoedown fork now or can I just point the submodule directly at hoedown? |
Ah sorry, missed this! We currently just conventionally have a fork for all repos. It's partly motivated by just making sure the repo doesn't disappear (e.g. you can build historical versions of Rust), but it's not the strongest reason, it's done mostly today because we just did it yesterday! |
Completely forgot about this as well, PR submitted. |
Cool. How did 2 commits between 3.0.4 and 3.0.5 balloon into 85 commits to Rust with 3000 lines of code change? That surprised me. Did the 3.0.4 not update properly? |
Ah the PR was sent against the master branch, not the last branch we had of hoedown, hence the large number of changes. |
@alexcrichton Ah, I see. Thanks! |
Both of these examples should look like the original when rendered as a table in rustdoc but neither do.
This:
Results in:
This:
Results in:
This was supposed to be fixed when rust updated hoedown to 3.0.4 (#27945) but it doesn't seem to work inside code blocks. hoedown/hoedown#77 seems to have covered those cases so I'm not sure where the problem lies.
The text was updated successfully, but these errors were encountered: