Skip to content

fix: prevent character-colon from consuming semicolon comment delimiter#589

Open
fltLi wants to merge 1 commit intoOpenWebGAL:devfrom
fltLi:fix/colon-highlight
Open

fix: prevent character-colon from consuming semicolon comment delimiter#589
fltLi wants to merge 1 commit intoOpenWebGAL:devfrom
fltLi:fix/colon-highlight

Conversation

@fltLi
Copy link
Copy Markdown
Contributor

@fltLi fltLi commented Apr 12, 2026

脚本编辑器语法高亮配置有误: 当首个 : 出现在 ; 后时, 会将 : 前的内容视为指令而非注释.

修复前 修复后
bug fix

Modify the regex for character-colon pattern to stop matching character
name at an unescaped semicolon. This prevents the colon inside a comment
from being incorrectly treated as a statement operator when a semicolon
appears before it in the line.
@fltLi
Copy link
Copy Markdown
Contributor Author

fltLi commented Apr 12, 2026

备注: 此错误原本存在, 并非 #584 引入.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the regex for the character-colon highlighting pattern in hl.json to exclude semicolons from character names, preventing incorrect matches. The reviewer suggests applying a similar fix to the utterance-semicolon pattern at line 230 to ensure consistency and avoid misidentifying comments as utterances.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant