Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.
Description
Version
22.4.0
Platform
Darwin moxy.lan 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:17:33 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6031 arm64 Subsystem
util
What steps will reproduce the bug?
console.log(util.stripVTControlCharacters('\x1b]8;http://example.com\x1b\\This is a link\x1b]8;\x1b\\ hello')) How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Should output:
This is a link hello (With "This is a link" not hyperlinked.)
What do you see instead?
ttp://example.comThis is a link; hello Additional information
OCS codes are a bit tricky to capture and strip, but this is what I'm using in ansi-to-pre:
/\u001B\]8;(.*?)(?:\u001B\\|\u0007)(.*?)\u001B]8;(?\u001B\\|\u0007)/ Adding str.replaceAll(/\u001b\]8;(.*?)(?:\u001b\\|\u0007)(.*?)\u001b]8;(?:\u001b\\|\u0007)/g, '$2') should do the right thing, but not sure if there's some better way to do it in context.
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.