@astrojs/markdown-remark 5.0.0 → 5.1.0
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/dist/rehype-prism.js +1 -1
- package/dist/shiki.js +1 -0
- package/package.json +2 -2
package/dist/rehype-prism.js
CHANGED
|
@@ -5,7 +5,7 @@ const rehypePrism = () => {
|
|
|
5
5
|
await highlightCodeBlocks(tree, (code, language) => {
|
|
6
6
|
let { html, classLanguage } = runHighlighterWithAstro(language, code);
|
|
7
7
|
return Promise.resolve(
|
|
8
|
-
`<pre class="${classLanguage}"><code is:raw class="${classLanguage}">${html}</code></pre>`
|
|
8
|
+
`<pre class="${classLanguage}" data-language="${language}"><code is:raw class="${classLanguage}">${html}</code></pre>`
|
|
9
9
|
);
|
|
10
10
|
});
|
|
11
11
|
};
|
package/dist/shiki.js
CHANGED
|
@@ -63,6 +63,7 @@ async function createShikiHighlighter({
|
|
|
63
63
|
const classValue = (normalizePropAsString(node.properties.class) ?? "") + (attributesClass ? ` ${attributesClass}` : "");
|
|
64
64
|
const styleValue = (normalizePropAsString(node.properties.style) ?? "") + (attributesStyle ? `; ${attributesStyle}` : "");
|
|
65
65
|
node.properties.class = classValue.replace(/shiki/g, "astro-code");
|
|
66
|
+
node.properties.dataLanguage = lang;
|
|
66
67
|
if (wrap === false) {
|
|
67
68
|
node.properties.style = styleValue + "; overflow-x: auto;";
|
|
68
69
|
} else if (wrap === true) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/markdown-remark",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "withastro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@astrojs/prism": "^3.
|
|
29
|
+
"@astrojs/prism": "^3.1.0",
|
|
30
30
|
"github-slugger": "^2.0.0",
|
|
31
31
|
"hast-util-from-html": "^2.0.0",
|
|
32
32
|
"hast-util-to-text": "^4.0.0",
|