Skip to content

Exclude trailing underscore from bracket pairs in LaTeX#272758

Merged
hediet merged 2 commits intomicrosoft:mainfrom
jlelong:pair_trailing_underscore
Oct 27, 2025
Merged

Exclude trailing underscore from bracket pairs in LaTeX#272758
hediet merged 2 commits intomicrosoft:mainfrom
jlelong:pair_trailing_underscore

Conversation

@jlelong
Copy link
Contributor

@jlelong jlelong commented Oct 22, 2025

Fix #251460.
See also jlelong/vscode-latex-basics#124

This PR also brings to the TeX grammar the changes introduced in #272329 to the LaTeX grammar only.

Copilot AI review requested due to automatic review settings October 22, 2025 19:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses bracket pair matching issues in LaTeX by excluding specific scopes from bracket pair analysis. The main changes ensure that trailing underscores and other mathematical operators don't interfere with bracket pair matching in both TeX and LaTeX grammars.

Key changes:

  • Added unbalancedBracketScopes configuration to the TeX grammar
  • Extended unbalancedBracketScopes in the LaTeX grammar to include punctuation.math.operator.tex

@hediet hediet enabled auto-merge (squash) October 27, 2025 12:02
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 27, 2025
@TylerLeonhardt TylerLeonhardt added the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Oct 27, 2025
@vs-code-engineering vs-code-engineering bot removed the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Oct 27, 2025
@microsoft microsoft deleted a comment from vs-code-engineering bot Oct 27, 2025
@TylerLeonhardt TylerLeonhardt added ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" and removed ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" labels Oct 27, 2025
@vs-code-engineering vs-code-engineering bot removed the ~copilot-video-please ⚠️WIP🏗️ Use in PRs. Runs Copilot CLI agent to record a video of "trying out the change" label Oct 27, 2025
@hediet hediet merged commit c165ba3 into microsoft:main Oct 27, 2025
17 checks passed
@jlelong jlelong deleted the pair_trailing_underscore branch October 27, 2025 18:07
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bracket pair colorization stop working at line 4986

5 participants