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

Comments

Projects
None yet
4 participants
@Aaron1011
Copy link
Contributor

Aaron1011 commented Apr 8, 2017

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

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Apr 8, 2017

Taking a look.

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented Apr 9, 2017

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

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Apr 10, 2017

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

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Apr 10, 2017

@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

Rollup merge of rust-lang#41173 - GuillaumeGomez:fix-rustdoc-code-blo…
…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

Rollup merge of rust-lang#41173 - GuillaumeGomez:fix-rustdoc-code-blo…
…ck-parsing, r=steveklabnik

Fix block code headers parsing

Fixes rust-lang#41167.

r? @rust-lang/docs

@bors bors closed this in #41173 Apr 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.