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

Rustdoc no longer processes text, no_run code blocks #41167

Closed
Aaron1011 opened this issue Apr 8, 2017 · 4 comments
Closed

Rustdoc no longer processes text, no_run code blocks #41167

Aaron1011 opened this issue Apr 8, 2017 · 4 comments
Assignees
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Milestone

Comments

@Aaron1011
Copy link
Member

With Rust 1.16.0, the following snippet is parsed correctly by rustdoc:

//! ```text, no_run
//! 'aa'
//! ```

However, this appears to be broken on the latest nightly (tested on 53f4bc311 2017-04-07). The code block appears to be interpreted as rust code, giving this error:

error: character literal may only contain one codepoint: 'aa'
 --> <stdin>:1:1
  |
1 | 'aa'
  | ^^^^

@GuillaumeGomez
Copy link
Member

Taking a look.

@steveklabnik steveklabnik added A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. P-high High priority labels Apr 9, 2017
@steveklabnik
Copy link
Member

So, here's something interesting: the space after the , matters. That is, on stable

//! ```text, no_run

passes but

//! ```text,no_run

fails.

This might be considered a bugfix; it really depends. text,no_run is pretty incoherent as a combination of attributes, semantically speaking.

We should talk about this at the @rust-lang/docs meeting

@GuillaumeGomez
Copy link
Member

@steveklabnik: We handle whitespaces strangely, I fix it.

@GuillaumeGomez
Copy link
Member

@steveklabnik: I fixed the problem in the second commit.

@alexcrichton alexcrichton modified the milestone: 1.18 Apr 10, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 11, 2017
…ck-parsing, r=steveklabnik

Fix block code headers parsing

Fixes rust-lang#41167.

r? @rust-lang/docs
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 11, 2017
…ck-parsing, r=steveklabnik

Fix block code headers parsing

Fixes rust-lang#41167.

r? @rust-lang/docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

4 participants