[BUG][LSP] The parser incorrectly parses docstrings containing `\\ \\` alongside Mojo code blocks
Open
Nobody has claimed this yet.
auto_priority_triaged
bug
modular-repo
mojo
mojo-lsp
- Dominant language
- Mojo
- Stars
- 29.8k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Bug description
As title.
Steps to reproduce
fn f():
"""
\\ \\
```mojo # use of unknown declaration 'o'
#
```
"""
System information
mojo 25.3.0.dev2025042605 (decc1331)
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
Start by reproducing the documented Mojo LSP parser failure with the provided function, docstring, backslashes, and nested Mojo code block. Locate the parser entry point responsible for docstrings and fenced code blocks; done means this example no longer produces the reported unknown declaration error.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100