Feature request: inject syntax highlighting for TOML into crate docs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 232
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 60
Description
I just ran into this while working on https://github.com/launchbadge/sqlx/pull/3383
It'd be really nice to have syntax highlighting for TOML in crate docs, because I'm including a lot of it.
I found https://github.com/rust-lang/docs.rs/issues/1047 which was closed already and the upstream issue https://github.com/rust-lang/rust/issues/43165, but the general disposition for the latter seems to be summed up by this comment: https://github.com/rust-lang/rust/issues/43165#issuecomment-551141278
It doesn't seem likely that rustdoc itself will gain support for this anytime soon.
The reason I'm opening this issue is because this comment points out that TOML syntax highlighting is already available on the details pages for crates. It doesn't seem like it would take much to inject it into the HTML for the docs themselves.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how docs.rs adds TOML highlighting on crate details pages, then inspect the HTML generation path for crate documentation. Confirm the existing highlighting mechanism can also cover TOML code in rendered crate docs, and verify the generated HTML displays it correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100