Skip to content

Use pygments to syntax highlight rustdocs #1952

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
brson opened this issue Mar 10, 2012 · 4 comments
Closed

Use pygments to syntax highlight rustdocs #1952

brson opened this issue Mar 10, 2012 · 4 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@brson
Copy link
Contributor

brson commented Mar 10, 2012

Pandoc has support for pygments and we have a rust plugin for pygments, so we should make them work together

@ghost ghost assigned brson Mar 10, 2012
@brson
Copy link
Contributor Author

brson commented Mar 12, 2012

Pandoc doesn't support pygments after all - its default theme is the pygments theme, but it uses kate syntax definitions

@bstrie
Copy link
Contributor

bstrie commented Mar 13, 2012

Wouldn't it be possible to support highlighting in the library docs by using whatever mechanism provides highlighting in the tutorial?

@brson
Copy link
Contributor Author

brson commented Mar 13, 2012

Yes. The reason I haven't wanted to do that is because we use a node.js script to postprocess the tutorial and I don't want to introduce that dependency to rustdoc. Possibly we could use the same script to do the syntax highlighting on the client side.

@thestinger
Copy link
Contributor

Closing in favour of #5259 since pandoc now has Rust syntax highlighting support.

Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
It's super annoying to be forced to use this bad convention, and
apparently everyone agrees. The only reason no improvements have been
done is because those were blocked on writing a better checker.

I strongly believe that no checker is better than a bad checker, so
let's just delete it in the meantime. I kindly asked anyone who sees
this to complain about overly long sentences in review in the future, I
think we can make this turn out fine.
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
It's super annoying to be forced to use this bad convention, and
apparently everyone agrees. The only reason no improvements have been
done is because those were blocked on writing a better checker.

I strongly believe that no checker is better than a bad checker, so
let's just delete it in the meantime. I kindly asked anyone who sees
this to complain about overly long sentences in review in the future, I
think we can make this turn out fine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. 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