mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Convert ansi from exclaim to HTML.
This commit is contained in:
parent
5959d2d28e
commit
6ef4b2bbae
3 changed files with 14 additions and 4 deletions
11
package-lock.json
generated
11
package-lock.json
generated
|
@ -305,6 +305,14 @@
|
|||
"color-convert": "1.9.0"
|
||||
}
|
||||
},
|
||||
"ansi-to-html": {
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/ansi-to-html/-/ansi-to-html-0.6.4.tgz",
|
||||
"integrity": "sha512-XuUGfj3zOAg3/NCU7Oyf9PaCyFuDVj8dzMqezMycPxo5U52atXt+R4L/zW7ETNA2GTjyj/KGBVEFI8sgPWUu2w==",
|
||||
"requires": {
|
||||
"entities": "1.1.1"
|
||||
}
|
||||
},
|
||||
"any-promise": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
||||
|
@ -2354,8 +2362,7 @@
|
|||
"entities": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
|
||||
"integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=",
|
||||
"dev": true
|
||||
"integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA="
|
||||
},
|
||||
"errno": {
|
||||
"version": "0.1.4",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"description": "Vimperator/Pentadactyl successor",
|
||||
"dependencies": {
|
||||
"@types/nearley": "^2.11.0",
|
||||
"ansi-to-html": "^0.6.4",
|
||||
"fuse.js": "^3.2.0",
|
||||
"mark.js": "^8.11.1",
|
||||
"nearley": "^2.11.0",
|
||||
|
|
|
@ -97,6 +97,7 @@ import * as Logging from "./logging"
|
|||
const logger = new Logging.Logger("excmds")
|
||||
import Mark from "mark.js"
|
||||
import * as semverCompare from "semver-compare"
|
||||
import * as ansiConvert from "ansi-to-html"
|
||||
|
||||
//#content_helper
|
||||
// {
|
||||
|
@ -211,7 +212,8 @@ export async function nativegate(version = "0", interactive = true): Promise<Boo
|
|||
|
||||
//#background
|
||||
export async function exclaim(...str: string[]) {
|
||||
fillcmdline((await Native.run(str.join(" "))).content)
|
||||
const convert = new ansiConvert()
|
||||
fillcmdline(convert.toHtml((await Native.run(str.join(" "))).content))
|
||||
} // should consider how to give option to fillcmdline or not. We need flags.
|
||||
|
||||
//#background
|
||||
|
@ -505,7 +507,7 @@ export async function open(...urlarr: string[]) {
|
|||
if (["about:blank"].includes(url)) {
|
||||
url = url || undefined
|
||||
browserBg.tabs.update(await activeTabId(), { url })
|
||||
// Open URLs that firefox won't let us by running `firefox <URL>` on the command line
|
||||
// Open URLs that firefox won't let us by running `firefox <URL>` on the command line
|
||||
} else if (url.match(/^(about|file):.*/)) {
|
||||
Messaging.message("commandline_background", "recvExStr", ["nativeopen " + url])
|
||||
} else if (url !== "") {
|
||||
|
|
Loading…
Add table
Reference in a new issue