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

Book, config: TOML syntax highlighting broken #6932

Closed
felixrabe opened this issue May 12, 2019 · 3 comments
Closed

Book, config: TOML syntax highlighting broken #6932

felixrabe opened this issue May 12, 2019 · 3 comments
Labels
A-documenting-cargo-itself Area: Cargo's documentation C-bug Category: bug

Comments

@felixrabe
Copy link

The syntax highlighting of the long TOML section at https://doc.rust-lang.org/cargo/reference/config.html#configuration-keys looks wrong:

Screen Shot 2019-05-12 at 17 07 23

The section correctly starts with a ```toml fence:

Btw, GitHub seems to display that same section just fine:

https://github.com/rust-lang/cargo/blob/ceb1389037ff4987a9a51066a173012ee18861dc/src/doc/src/reference/config.md#configuration-keys

@felixrabe felixrabe added the C-bug Category: bug label May 12, 2019
@ehuss ehuss added the A-documenting-cargo-itself Area: Cargo's documentation label May 12, 2019
@ehuss
Copy link
Contributor

ehuss commented May 12, 2019

Yea, that's bugged me for a while. The problem is that the highlighting engine (highlight.js) doesn't highlight toml properly. Either highlight.js needs to be updated to handle comments after keys, or mdbook needs to switch to a different highlighter. Fixing highlight.js doesn't look too difficult.

@tesuji
Copy link
Contributor

tesuji commented May 24, 2019

cc rust-lang/mdBook#890

@ehuss
Copy link
Contributor

ehuss commented Jul 20, 2019

This is now fixed on nightly.

@ehuss ehuss closed this as completed Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants