@scalar/code-highlight 0.3.6 → 0.4.1
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 +14 -0
- package/dist/chunks/languages.js +99 -0
- package/dist/chunks/languages.js.map +1 -1
- package/dist/chunks/rehype-highlight.js +8 -2
- package/dist/chunks/rehype-highlight.js.map +1 -1
- package/dist/languages/mojo.d.ts +18 -0
- package/dist/languages/mojo.d.ts.map +1 -0
- package/dist/languages/standard.d.ts +1 -0
- package/dist/languages/standard.d.ts.map +1 -1
- package/dist/rehype-highlight/rehype-highlight.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -2959,10 +2959,16 @@ function rehypeHighlight(options) {
|
|
|
2959
2959
|
ruleId: "missing-language",
|
|
2960
2960
|
source: "rehype-highlight"
|
|
2961
2961
|
});
|
|
2962
|
-
/* c8 ignore next 5 -- throw arbitrary hljs errors */
|
|
2963
2962
|
return;
|
|
2964
2963
|
}
|
|
2965
|
-
|
|
2964
|
+
file.message("Could not highlight code block", {
|
|
2965
|
+
ancestors: [parent, node],
|
|
2966
|
+
cause,
|
|
2967
|
+
place: node.position,
|
|
2968
|
+
ruleId: "highlight-error",
|
|
2969
|
+
source: "rehype-highlight"
|
|
2970
|
+
});
|
|
2971
|
+
return;
|
|
2966
2972
|
}
|
|
2967
2973
|
if (!lang && result.data?.language) node.properties.className.push("language-" + result.data.language);
|
|
2968
2974
|
if (result.children.length > 0) node.children = result.children;
|