@scalar/code-highlight 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/markdown/markdown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/markdown/markdown.ts"],"names":[],"mappings":"AAyCA;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IACR,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,UAiDF;AASD;;GAEG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,MAAU,GAChB;IACD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,EAAE,CAiBF;AAuBD;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,YAgC5C"}
|
|
@@ -15,9 +15,7 @@ import { standardLanguages } from '../languages/standard.js';
|
|
|
15
15
|
/**
|
|
16
16
|
* Plugin to transform nodes in a Markdown AST
|
|
17
17
|
*/
|
|
18
|
-
const transformNodes = (options,
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20
|
-
..._ignored) => (tree) => {
|
|
18
|
+
const transformNodes = (options, ..._ignored) => (tree) => {
|
|
21
19
|
if (!options?.transform || !options?.type) {
|
|
22
20
|
return;
|
|
23
21
|
}
|
|
@@ -33,10 +31,7 @@ const transformNodes = (options,
|
|
|
33
31
|
function htmlFromMarkdown(markdown, options) {
|
|
34
32
|
// Add permitted tags and remove stripped ones
|
|
35
33
|
const removeTags = options?.removeTags ?? [];
|
|
36
|
-
const tagNames = [
|
|
37
|
-
...(defaultSchema.tagNames ?? []),
|
|
38
|
-
...(options?.allowTags ?? []),
|
|
39
|
-
].filter((t) => !removeTags.includes(t));
|
|
34
|
+
const tagNames = [...(defaultSchema.tagNames ?? []), ...(options?.allowTags ?? [])].filter((t) => !removeTags.includes(t));
|
|
40
35
|
const html = unified()
|
|
41
36
|
// Parses markdown
|
|
42
37
|
.use(remarkParse)
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lowlight",
|
|
17
17
|
"highlightjs"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.0.
|
|
19
|
+
"version": "0.0.22",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"vfile": "^6.0.1",
|
|
93
93
|
"vite": "^5.4.10",
|
|
94
94
|
"vue": "^3.5.12",
|
|
95
|
-
"@scalar/build-tooling": "0.1.
|
|
96
|
-
"@scalar/themes": "0.9.
|
|
95
|
+
"@scalar/build-tooling": "0.1.14",
|
|
96
|
+
"@scalar/themes": "0.9.68"
|
|
97
97
|
},
|
|
98
98
|
"scripts": {
|
|
99
99
|
"build": "scalar-build-rollup",
|