[bat] Make #region folding markers case-insensitive for REM#317784
Merged
aeschli merged 2 commits intoJun 1, 2026
Conversation
Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add case-insensitivity for folding markers in Bat
[bat] Make May 21, 2026
#region folding markers case-insensitive for REM
aeschli
approved these changes
May 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the batch (bat) language configuration’s folding marker regex so that #region / #endregion folding works for common case variants of REM comments in Windows CMD scripts, while keeping existing :: comment folding behavior intact.
Changes:
- Adjust batch folding marker patterns to match
REMin a case-insensitive way (including optional leading@). - Preserve the existing
::-based folding marker support.
Show a summary per file
| File | Description |
|---|---|
| extensions/bat/language-configuration.json | Updates folding marker regexes so region folding recognizes rem/Rem/REM and @rem variants. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
lramos15
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch folding markers currently only matched uppercase
REM, so region folding failed for commonrem/Remcomment styles in case-insensitive CMD scripts. This change updates Bat region marker matching to accept allREMcase variants (with optional@) while preserving existing::behavior.Scope
extensions/bat/language-configuration.jsonfolding marker regexes forstartandend.Behavior change
#region/#endregionnow match:REM ...rem ...Rem ...@REM .../@rem ...:: ...(unchanged)Regex update