modular / modular/modular

[BUG][LSP] The parser incorrectly parses docstrings containing `\\ \\` alongside Mojo code blocks

Open
#4,442 5 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.