feat: update shikiji, support twoslash (#3339)

pull/3343/head
Anthony Fu 1 year ago committed by GitHub
parent 08948968a6
commit 8800195457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -101,8 +101,8 @@
"mark.js": "8.11.1", "mark.js": "8.11.1",
"minisearch": "^6.3.0", "minisearch": "^6.3.0",
"mrmime": "^1.0.1", "mrmime": "^1.0.1",
"shikiji": "^0.7.4", "shikiji": "^0.9.2",
"shikiji-transformers": "^0.7.4", "shikiji-transformers": "^0.9.2",
"vite": "^5.0.2", "vite": "^5.0.2",
"vue": "^3.3.8" "vue": "^3.3.8"
}, },

@ -45,11 +45,11 @@ importers:
specifier: ^1.0.1 specifier: ^1.0.1
version: 1.0.1 version: 1.0.1
shikiji: shikiji:
specifier: ^0.7.4 specifier: ^0.9.2
version: 0.7.4 version: 0.9.2
shikiji-transformers: shikiji-transformers:
specifier: ^0.7.4 specifier: ^0.9.2
version: 0.7.4 version: 0.9.2
vite: vite:
specifier: ^5.0.2 specifier: ^5.0.2
version: 5.0.5(@types/node@20.10.0) version: 5.0.5(@types/node@20.10.0)
@ -4170,14 +4170,14 @@ packages:
resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==}
dev: true dev: true
/shikiji-transformers@0.7.4: /shikiji-transformers@0.9.2:
resolution: {integrity: sha512-oykilNekcW2FnRGbvZm+RNWHYroSeCVMOaMMwAbxozZgpTdcJtHoA+1+MDFw6/o2hCkX88kKbxG6FwAZoUZ6WQ==} resolution: {integrity: sha512-WEBeNm+oUL/4OTENjnZ5G29ErNM2cPGJHRRhqjwoTFkHnsJsACtTluTaYjPEppCl46Vo3M4TV9GwrMxz2WeCSg==}
dependencies: dependencies:
shikiji: 0.7.4 shikiji: 0.9.2
dev: false dev: false
/shikiji@0.7.4: /shikiji@0.9.2:
resolution: {integrity: sha512-N5dmPvyhH/zfcsuWysUEAMwRJDMz26LUns2VEUs5y4Ozbf5jkAODU0Yswjcf/tZAwpFnk5x3y34dupFMnF2+NA==} resolution: {integrity: sha512-bxXd5iOVvuPj0NVFWQG3YMNLAGkWHyjTGixM7wLzqJNz3WMaeiOZbOP12gjQWKMJg+Ca4jmgATrUWu/rFb3B8A==}
dependencies: dependencies:
hast-util-to-html: 9.0.0 hast-util-to-html: 9.0.0
dev: false dev: false

@ -163,6 +163,9 @@ export async function highlight(
transformerCompactLineOptions(lineOptions), transformerCompactLineOptions(lineOptions),
...userTransformers ...userTransformers
], ],
meta: {
__raw: attrs
},
...(typeof theme === 'string' || 'name' in theme ...(typeof theme === 'string' || 'name' in theme
? { theme } ? { theme }
: { : {

Loading…
Cancel
Save