-
Notifications
You must be signed in to change notification settings - Fork 53
[209_7] 修复bash代码模式下的错误高亮 #2672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[209_7] 修复bash代码模式下的错误高亮 #2672
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
d990e2d to
c577f37
Compare
| if (inline_comment_parser.can_parse (s, pos)) { | ||
| // Special handling for bash: # is only a comment at start of line or | ||
| // after whitespace | ||
| if (lan_name == "bash" && pos < N (s) && s[pos] == '#') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不能加特殊规则
|
|
||
| // Enable path boundary checking for bash to avoid highlighting commands in | ||
| // paths | ||
| if (name == "bash") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里也不能加特殊规则
c577f37 to
e9e472e
Compare
a05a5b2 to
2f5bafa
Compare
da-liii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
如何测试
\bash或者\bash-code插入代码块环境文件位置
2026/01/29
What
#在$#、${#...}中被误识别为注释的问题abc.git)How
prog_language.cpp增加可配置的path解析步骤,位于string_parser之后、keyword/number之前;匹配到路径/URL token 则整体消费bash-lang.scm中启用path解析inline_require_space:仅当#位于行首或空白后才作为注释起始2025/01/22
What
补充了bash-lang.scm中语法高亮的定义,增加了
git、gh、code、claudell、gco)2025/01/20
What
为Mogan STEM添加Bash代码的语法高亮支持,包括语言定义文件和样式包。
Why
满足用户的插入Bash代码需求
关联 issue #2607