Skip to content

fix(developer): do not treat backslash as a string escape in syntax highlighting#15001

Merged
mcdurdin merged 1 commit intomasterfrom
fix/developer/14988-string-escape-syntax-highlight
Oct 24, 2025
Merged

fix(developer): do not treat backslash as a string escape in syntax highlighting#15001
mcdurdin merged 1 commit intomasterfrom
fix/developer/14988-string-escape-syntax-highlight

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin commented Oct 23, 2025

Adjust two incorrect rules that caused backslash to be treated as an escape in strings in syntax highlighting in .kmn language.

For the following examples:

+ '\' > U+1234  c testing
+ '\\' > U+1234 c testing
+ '\\\' > U+1234 c testing
+ '"' > U+1234 c testing
+ "\" > U+1234 c testing

'"' x20 "'" x20 '""' x20 '\' x20 '\\' x20 "\" x20 "\\" x20 '"""' x20 + 'a' > 'b\' c comment

c quote in a comment ' this is ignored
c quote in a comment " this is ignored
+ ['] > U+1234  c quote in a VK is ignored
store(') x20    c quote as a parameter is ignored
+ ["] > U+1234  c quote in a VK is ignored
store(") x20    c quote as a parameter is ignored

Before fix:
image

After fix:
image

Fixes: #14988
Test-bot: skip
Build-bot: skip

…ighlighting

Adjust two incorrect rules that caused backslash to be treated as an
escape in strings in syntax highlighting in .kmn language.

Fixes: #14988
Test-bot: skip
Build-bot: skip
@keymanapp-test-bot
Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

Copy link
Copy Markdown
Contributor

@darcywong00 darcywong00 left a comment

Choose a reason for hiding this comment

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

lgtm

@mcdurdin mcdurdin merged commit e862f53 into master Oct 24, 2025
7 checks passed
@mcdurdin mcdurdin deleted the fix/developer/14988-string-escape-syntax-highlight branch October 24, 2025 07:18
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Oct 24, 2025
mcdurdin added a commit that referenced this pull request Oct 24, 2025
…ighlighting

Adjust two incorrect rules that caused backslash to be treated as an
escape in strings in syntax highlighting in .kmn language.

Fixes: #14988
Test-bot: skip
Build-bot: skip
Cherry-pick-of: #15001
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.145-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

bug(developer): syntax highlighting odd after backslash-apostrophe

3 participants