Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import chalk from 'chalk';
import Table from 'cli-table3';
import { highlight as highlightCli } from 'cli-highlight';
import * as emoji from 'node-emoji';
import ansiEscapes from 'ansi-escapes';
import supportsHyperlinks from 'supports-hyperlinks';
import ansiRegex from 'ansi-regex';

Expand Down Expand Up @@ -330,12 +329,8 @@ Renderer.prototype.link = function (href, title, text) {
} else {
link = this.o.href(href);
}
out = ansiEscapes.link(
link,
href
// textLength breaks on '+' in URLs
.replace(/\+/g, '%20')
);
// textLength breaks on '+' in URLs
out = `\u001B]8;;${href.replace(/\+/g, '%20')}\u0007${link}\u001B]8;;\u0007`;
} else {
if (hasText) out += this.emoji(text) + ' (';
out += this.o.href(href);
Expand Down
39 changes: 0 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"marked": ">=1 <17"
},
"dependencies": {
"ansi-escapes": "^7.0.0",
"ansi-regex": "^6.1.0",
"chalk": "^5.4.1",
"cli-highlight": "^2.1.11",
Expand Down