[GH-ISSUE #3812] 关键词标量 间歇性异常 & 异常触发 #2617

Open
opened 2026-02-27 00:53:38 +03:00 by kerem · 1 comment
Owner

Originally created by @Atul-8 on GitHub (Feb 19, 2025).
Original GitHub issue: https://github.com/electerm/electerm/issues/3812

Electerm Version and download file extension(Electerm版本和下载文件后缀)

win-x64-installer.exe V1.60.56

Platform detail (平台详情)

window

What steps will reproduce the bug?(重新问题的详细步骤)

我设置了两个关键词 [test] 和 [error]

Image
(由于我不太懂正则表达式, 我是利用ai去生成对应的正则表达式描述)
现在[test] 打印会是下面这种情况, 只是间断性触发标亮; 如果不使用 "\[test\]" 而是 用"[test]" 只要是文字英文设计这四个字母都会标亮; 但是我只想指定完全匹配我输入的内容才会标量; 希望能优化一下
Image

What should have happened?(期望的结果)

希望能根据输入完全匹配的才会标亮,而不是要自己还要手动套一层正则表达式的规范 以降低使用者门槛

Would this happen in other terminal app(是否能够在其他同类软件重现这个问题)

No response

Additional information(其他任何相关信息)

No response

Originally created by @Atul-8 on GitHub (Feb 19, 2025). Original GitHub issue: https://github.com/electerm/electerm/issues/3812 ### Electerm Version and download file extension(Electerm版本和下载文件后缀) win-x64-installer.exe V1.60.56 ### Platform detail (平台详情) window ### What steps will reproduce the bug?(重新问题的详细步骤) 我设置了两个关键词 [test] 和 [error] ![Image](https://github.com/user-attachments/assets/24a8210e-42e2-4582-bc4b-64c71a243ea0) (由于我不太懂正则表达式, 我是利用ai去生成对应的正则表达式描述) 现在[test] 打印会是下面这种情况, 只是间断性触发标亮; 如果不使用 "\\[test\\]" 而是 用"[test]" 只要是文字英文设计这四个字母都会标亮; 但是我只想指定完全匹配我输入的内容才会标量; 希望能优化一下 ![Image](https://github.com/user-attachments/assets/ad568731-2f3f-4787-8e9d-685d17b8dfc4) ### What should have happened?(期望的结果) 希望能根据输入完全匹配的才会标亮,而不是要自己还要手动套一层正则表达式的规范 以降低使用者门槛 ### Would this happen in other terminal app(是否能够在其他同类软件重现这个问题) _No response_ ### Additional information(其他任何相关信息) _No response_
Author
Owner

@zxdong262 commented on GitHub (Feb 19, 2025):

会自动转化成正则,因为[]在正则里有特殊含义,所以需要转义字符加\

<!-- gh-comment-id:2667353385 --> @zxdong262 commented on GitHub (Feb 19, 2025): 会自动转化成正则,因为[]在正则里有特殊含义,所以需要转义字符加\
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#2617
No description provided.