Skip to content

Make onEnterRules patterns case-insensitive for Visual Basic#284782

Closed
Copilot wants to merge 3 commits intodev/dmitriv/vb-indent-rulesfrom
copilot/sub-pr-284711
Closed

Make onEnterRules patterns case-insensitive for Visual Basic#284782
Copilot wants to merge 3 commits intodev/dmitriv/vb-indent-rulesfrom
copilot/sub-pr-284711

Conversation

Copy link
Contributor

Copilot AI commented Dec 22, 2025

Visual Basic is case-insensitive, but the onEnterRules patterns in language-configuration.json were matching keywords case-sensitively. This meant indentation behavior would fail for code written as "end if" or "END IF" instead of "End If".

Changes

  • Converted all onEnterRules patterns from string format to object format with "flags": "i"
    • beforeText pattern in first rule (End statements and block terminators)
    • previousLineText pattern in second rule (blank line after block terminators)
    • beforeText pattern in third rule (lines ending with closing parenthesis)
// Before
"beforeText": "^\\s*((End\\s+If)|Else)\\b.*$"

// After
"beforeText": { "pattern": "^\\s*((End\\s+If)|Else)\\b.*$", "flags": "i" }

This aligns with patterns used in HTML and Handlebars language configurations for case-insensitive languages.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update indentation rules for Visual Basic based on feedback Make onEnterRules patterns case-insensitive for Visual Basic Dec 22, 2025
Copilot AI requested a review from dmitrivMS December 22, 2025 21:11
@dmitrivMS dmitrivMS closed this Dec 22, 2025
@dmitrivMS dmitrivMS deleted the copilot/sub-pr-284711 branch January 29, 2026 23:42
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Feb 5, 2026
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.

2 participants