@scalar/code-highlight 0.0.11 → 0.0.13
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 +12 -0
- package/dist/code/highlight.d.ts.map +1 -1
- package/dist/code/highlight.js +2 -2
- package/package.json +18 -11
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../src/code/highlight.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAQ9C,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;IACP,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACrC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CACpC,
|
|
1
|
+
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../src/code/highlight.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAQ9C,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;IACP,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACrC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CACpC,UA8CF"}
|
package/dist/code/highlight.js
CHANGED
|
@@ -10,9 +10,9 @@ function syntaxHighlight(codeString, options) {
|
|
|
10
10
|
// Simple restriction on credentials to prevent unexpected behavior
|
|
11
11
|
const credentials = (typeof options?.maskCredentials === 'string'
|
|
12
12
|
? [options.maskCredentials]
|
|
13
|
-
: options?.maskCredentials ?? []).filter((c) => {
|
|
13
|
+
: (options?.maskCredentials ?? [])).filter((c) => {
|
|
14
|
+
// Credentials must be at least 3 characters to mask.
|
|
14
15
|
if (c.length < 3) {
|
|
15
|
-
console.error(`Codeblock credentials must be at least 3 characters to mask. Will not mask "${c}"`);
|
|
16
16
|
return false;
|
|
17
17
|
}
|
|
18
18
|
return true;
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lowlight",
|
|
17
17
|
"highlightjs"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.0.
|
|
19
|
+
"version": "0.0.13",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
@@ -25,31 +25,38 @@
|
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
27
|
"import": "./dist/index.js",
|
|
28
|
-
"types": "./dist/index.d.ts"
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
29
30
|
},
|
|
30
31
|
"./rehype-highlight": {
|
|
31
32
|
"import": "./dist/rehype-highlight/index.js",
|
|
32
|
-
"types": "./dist/rehype-highlight/index.d.ts"
|
|
33
|
+
"types": "./dist/rehype-highlight/index.d.ts",
|
|
34
|
+
"default": "./dist/rehype-highlight/index.js"
|
|
33
35
|
},
|
|
34
36
|
"./markdown": {
|
|
35
37
|
"import": "./dist/markdown/index.js",
|
|
36
|
-
"types": "./dist/markdown/index.d.ts"
|
|
38
|
+
"types": "./dist/markdown/index.d.ts",
|
|
39
|
+
"default": "./dist/markdown/index.js"
|
|
37
40
|
},
|
|
38
41
|
"./languages": {
|
|
39
42
|
"import": "./dist/languages/index.js",
|
|
40
|
-
"types": "./dist/languages/index.d.ts"
|
|
43
|
+
"types": "./dist/languages/index.d.ts",
|
|
44
|
+
"default": "./dist/languages/index.js"
|
|
41
45
|
},
|
|
42
46
|
"./code": {
|
|
43
47
|
"import": "./dist/code/index.js",
|
|
44
|
-
"types": "./dist/code/index.d.ts"
|
|
48
|
+
"types": "./dist/code/index.d.ts",
|
|
49
|
+
"default": "./dist/code/index.js"
|
|
45
50
|
},
|
|
46
51
|
"./css/*.css": {
|
|
47
52
|
"import": "./dist/css/*.css",
|
|
48
|
-
"require": "./dist/css/*.css"
|
|
53
|
+
"require": "./dist/css/*.css",
|
|
54
|
+
"default": "./dist/css/*.css"
|
|
49
55
|
},
|
|
50
56
|
"./*.css": {
|
|
51
57
|
"import": "./dist/*.css",
|
|
52
|
-
"require": "./dist/*.css"
|
|
58
|
+
"require": "./dist/*.css",
|
|
59
|
+
"default": "./dist/*.css"
|
|
53
60
|
}
|
|
54
61
|
},
|
|
55
62
|
"files": [
|
|
@@ -85,9 +92,9 @@
|
|
|
85
92
|
"rollup": "^4.16.4",
|
|
86
93
|
"vfile": "^6.0.1",
|
|
87
94
|
"vite": "^5.2.10",
|
|
88
|
-
"vue": "^3.
|
|
89
|
-
"@scalar/build-tooling": "0.1.
|
|
90
|
-
"@scalar/themes": "0.9.
|
|
95
|
+
"vue": "^3.5.12",
|
|
96
|
+
"@scalar/build-tooling": "0.1.11",
|
|
97
|
+
"@scalar/themes": "0.9.37"
|
|
91
98
|
},
|
|
92
99
|
"scripts": {
|
|
93
100
|
"build": "scalar-build-rollup",
|