Skip to content
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

Nonfatal rustdoc error on cssparser-macros #40978

Closed
jdm opened this issue Mar 31, 2017 · 4 comments
Closed

Nonfatal rustdoc error on cssparser-macros #40978

jdm opened this issue Mar 31, 2017 · 4 comments
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jdm
Copy link
Contributor

jdm commented Mar 31, 2017

The new markdown parser does not like this code block: https://github.com/servo/rust-cssparser/blob/20b509a7d3ca6c432281ebd00680bb0c3f5aadef/macros/lib.rs#L60-L67
I see:

error: unknown start of token: \u{2026}
 --> <stdin>:1:72
  |
1 | static MAP: &'static ::cssparser::phf::Map<&'static str, $ValueType> = …;
  |                                                                        ^

warning: Backing out of syntax highlighting
  |
  = note: You probably did not intend to render this as a rust code-block
@jdm jdm added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Mar 31, 2017
@zackmdavis
Copy link
Member

\u{2026} is the ellipsis (…). One could argue that the parser is correct to notice that can't be the first codepoint of a token in valid Rust? (Although this consideration is probably outweighed by the manifest convenience of using an ellipsis to indicate that part of a doc example is irrelevant.)

bors-servo pushed a commit to servo/rust-cssparser that referenced this issue Apr 3, 2017
Mark invalid Rust as text-only documentation.

This avoids rust-lang/rust#40978.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/131)
<!-- Reviewable:end -->
@steveklabnik steveklabnik added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Apr 3, 2017
@steveklabnik
Copy link
Member

I put a link in the tracking issue; I basically agree with @zackmdavis on both counts here. I see this has already been fixed upstream, but let's talk about if this is the actual behavior we want or not.

@GuillaumeGomez
Copy link
Member

@jdm: That's because every code block is considered being rust code and therefore is tested. Hoedown didn't consider such block as code blocks before, you just need to add ignore flags to this code block (or text).

@GuillaumeGomez
Copy link
Member

Since this is expected, I'll close it. Don't hesitate to reopen it if I missed anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. 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

4 participants