rust-lang / rust-lang/rust-analyzer
Broken markdown for mixing backticks and tildes in code block
Open
Nobody has claimed this yet.
A-hover
C-bug
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I tried this code and hovering over the function definition:
/// ```text
/// ~~~
/// ```
///
/// ~~~text
/// ```
/// ~~~
pub fn foo() {}

I expected to see two text code blocks like this:
~~~
```
Instead, garbled markdown shows up. Rustdoc renders this correctly.
rust-analyzer version: 0.4.1327-standalone
rustc version:
rustc 1.68.0-nightly (9c07efe84 2022-12-16)
binary: rustc
commit-hash: 9c07efe84f28a44f3044237696acc295aa407ee5
commit-date: 2022-12-16
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6
Contributor guide
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
Reproduce the reported example in rust-analyzer by hovering over the function definition, then inspect the hover rendering path and compare its Markdown handling with rustdoc. Done means mixed backtick and tilde fences render as the two expected text code blocks without garbling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100