Skip to content

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

Closed
mdinger opened this issue Sep 5, 2015 · 9 comments
Closed

rustdoc fails to treat pipe character inside code blocks properly #28251

mdinger opened this issue Sep 5, 2015 · 9 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@mdinger
Copy link
Contributor

mdinger commented Sep 5, 2015

Both of these examples should look like the original when rendered as a table in rustdoc but neither do.

This:

//! Test  | Table
//! ------|-------------
//! t = b | `x | y | z`

Results in:

//! Test  | Table
//! ------|-------------
//! t = b | `x

This:

//! Test  | Table
//! ------|-------------
//! t = b | `x \| y \| z`

Results in:

//! Test  | Table
//! ------|-------------
//! t = b | `x \

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.

@ghost
Copy link

ghost commented Sep 5, 2015

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>

@mdinger
Copy link
Contributor Author

mdinger commented Sep 5, 2015

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.

@ghost
Copy link

ghost commented Sep 5, 2015

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?

@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 5, 2015
@mdinger
Copy link
Contributor Author

mdinger commented Sep 21, 2015

@alexcrichton ^^

@alexcrichton
Copy link
Member

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!

@ghost
Copy link

ghost commented Sep 21, 2015

Completely forgot about this as well, PR submitted.

@mdinger
Copy link
Contributor Author

mdinger commented Sep 21, 2015

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?

@ghost ghost mentioned this issue Sep 21, 2015
@alexcrichton
Copy link
Member

Ah the PR was sent against the master branch, not the last branch we had of hoedown, hence the large number of changes.

@mdinger
Copy link
Contributor Author

mdinger commented Sep 21, 2015

@alexcrichton Ah, I see. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants