| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| '[\\dA-PR-TZcf-nq-uy=><~]))', 'g', | ||
| '(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))' + | ||
| '|[\\u001B\\u009B][[\\]()#;?]*' + | ||
| '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?' + |
|
Pushed updates addressing the feedback: Accepted the [;:] CSI parameter separator suggestion (@Archkon) and reworded the commit to follow commit message guidelines Verified the final regex against every added test case and confirmed it now matches upstream ansi-regex v6.2.0 exactly. |
Sorry, something went wrong.
|
Hi @Archkon, @avivkeller |
Sorry, something went wrong.
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #64319 +/- ##
========================================
Coverage 90.14% 90.14%
========================================
Files 741 744 +3
Lines 242076 242516 +440
Branches 45558 45691 +133
========================================
+ Hits 218216 218613 +397
- Misses 15385 15409 +24
- Partials 8475 8494 +19
... and 100 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
The bundled ansi-regex OSC pattern used a restrictive URI character class that failed when URIs contained RFC 3986-valid characters such as parentheses. Match OSC sequences generically as ESC ] ... ST, aligned with ansi-regex v6.2.0. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: dushyant <dushyanthada90@gmail.com>
Co-authored-by: Archkon <180910180+Archkon@users.noreply.github.com> Signed-off-by: dushyant <dushyanthada90@gmail.com>
Signed-off-by: dushyant <dushyanthada90@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: dushyant <dushyanthada90@gmail.com>
Remove the extra non-capturing group around CSI parameters and the final byte so the bundled pattern matches ansi-regex at 72bc570 exactly. Refs: https://github.com/chalk/ansi-regex/blob/72bc570aaf25fca25541b49c6a8564f3ec63e835/index.js Signed-off-by: dushyant <dushyanthada90@gmail.com>
The previous comment claimed truncated OSC sequences were left unmatched rather than partially stripped. The CSI alternative can still consume a short prefix, which is why the expected remainder is 'ttps://...'. Update the comment to describe that behavior. Signed-off-by: dushyant <dushyanthada90@gmail.com>
|
I have updated the commit message to comply with the Node.js commit guidelines, since the previous message was failing CI. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Friendly ping, |
Sorry, something went wrong.
|
Hi @aduh95 , can you please have a look at this PR when you have a chance? If everything looks good, I'd appreciate your help getting it landed. Thank you! |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
The bundled ansi-regex OSC pattern used a restrictive URI character class that failed when URIs contained RFC 3986-valid characters such as parentheses. Match OSC sequences generically as ESC ] ... ST, aligned with ansi-regex v6.2.0. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: dushyant <dushyanthada90@gmail.com> PR-URL: #64319 Fixes: #64313 Reviewed-By: Aviv Keller <me@aviv.sh>
The bundled ansi-regex OSC pattern used a restrictive URI character class that failed when URIs contained RFC 3986-valid characters such as parentheses. Match OSC sequences generically as ESC ] ... ST, aligned with ansi-regex v6.2.0. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: dushyant <dushyanthada90@gmail.com> PR-URL: #64319 Fixes: #64313 Reviewed-By: Aviv Keller <me@aviv.sh>
| Back | FazBrowse Home | New Git URL |
Fixes: #64313
Summary
The bundled ansi-regex OSC pattern used by stripVTControlCharacters() relied on a restrictive URI character class that failed when OSC 8 hyperlink URIs contained RFC 3986-valid characters such as (, ), !, +, [ and ].
This updates OSC handling to match sequences generically as:
aligned with ansi-regex v6.2.0.
Problem
stripVTControlCharacters() failed to correctly strip OSC 8 hyperlinks whose URI contained characters omitted from the previous regex character class:
Example:
Actual
Expected
The OSC match terminated early at (, leaving most of the escape sequence in the output.
Changes
Tests
Added regression coverage in:
for OSC 8 hyperlinks containing:
across all supported OSC string terminators.
Notes