fix(observer): template literal regex escaping — \s/\d had wrong backslash count (v0.5.41)
Root cause: regex literals inside template literal (\...\) need exactly 2 backslashes (\\s, \\d) to produce \s, \d in the output. The v9 code had 4 backslashes (\\\\s) which produced literal \\s in the browser (matching backslash+s instead of whitespace class). This broke: - 'Running N commands' skip pattern (never matched) - NOISE_CODE_RE (declare/import line filters) - cleanLines() pre-strip word boundary \\b and split/join \\n - cleanButtonText() whitespace strip \\s The fix restores all regex-literal patterns to exactly 2 backslashes. new RegExp() string patterns (like NOISE_RE) already used 4 backslashes correctly (string→regex has one extra escaping layer). Verified: node eval of generated code confirms /^Running\s*\d+\s*commands?$/i correctly matches 'Running2 commands' and 'Running 4 commands'. #task-619 #task-620
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"name": "gravity-bridge",
|
"name": "gravity-bridge",
|
||||||
"displayName": "Gravity Bridge",
|
"displayName": "Gravity Bridge",
|
||||||
"description": "Discord-based unified approval system for Antigravity AI interactions.",
|
"description": "Discord-based unified approval system for Antigravity AI interactions.",
|
||||||
"version": "0.5.40",
|
"version": "0.5.41",
|
||||||
"publisher": "variet",
|
"publisher": "variet",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.100.0"
|
"vscode": "^1.100.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user