Skip to content

Wrong matching bracket highlighted in certain cases #784

@sergeichestakov

Description

@sergeichestakov

Looks like the match bracket heuristic breaks in certain cases. This is most notable in the following example doc which contains valid C code. Not entirely sure what it is about this specific example that causes the wrong brackets to get highlighted in some cases but thought I'd flag here since it is potentially indicative of a bug.

See gif:

cm-match-bracket-bug

Repro here (lines 52-65 of the doc are perhaps most relevant) https://replit.com/@SergeiChestakov/cm-bracketmatch-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions