@astrojs/markdown-remark 0.6.1-next.1 → 0.6.1-next.2

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,5 +1,11 @@
1
1
  # @astrojs/markdown-remark
2
2
 
3
+ ## 0.6.1-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2564](https://github.com/withastro/astro/pull/2564) [`d71c4620`](https://github.com/withastro/astro/commit/d71c46207af40de6811596ca4f5e10aa9006377b) Thanks [@JuanM04](https://github.com/JuanM04)! - Fixed curly braces inside Shiki codeblocks
8
+
3
9
  ## 0.6.1-next.1
4
10
 
5
11
  ### Patch Changes
@@ -9,7 +9,7 @@ const remarkShiki = async ({ langs = [], theme = "github-dark", wrap = false })
9
9
  visit(tree, "code", (node) => {
10
10
  var _a;
11
11
  let html = highlighter.codeToHtml(node.value, { lang: (_a = node.lang) != null ? _a : "plaintext" });
12
- html = html.replace('<pre class="shiki"', '<pre class="astro-code"');
12
+ html = html.replace('<pre class="shiki"', '<pre data-astro-raw class="astro-code"');
13
13
  html = html.replace(/style="(background-)?color: var\(--shiki-/g, 'style="$1color: var(--astro-code-');
14
14
  if (wrap === false) {
15
15
  html = html.replace(/style="(.*?)"/, 'style="$1; overflow-x: auto;"');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/markdown-remark",
3
- "version": "0.6.1-next.1",
3
+ "version": "0.6.1-next.2",
4
4
  "type": "module",
5
5
  "author": "withastro",
6
6
  "license": "MIT",
@@ -40,8 +40,8 @@ const remarkShiki = async ({ langs = [], theme = 'github-dark', wrap = false }:
40
40
  visit(tree, 'code', (node) => {
41
41
  let html = highlighter.codeToHtml(node.value, { lang: node.lang ?? 'plaintext' });
42
42
 
43
- // Replace "shiki" class naming with "astro".
44
- html = html.replace('<pre class="shiki"', '<pre class="astro-code"');
43
+ // Replace "shiki" class naming with "astro" and add "data-astro-raw".
44
+ html = html.replace('<pre class="shiki"', '<pre data-astro-raw class="astro-code"');
45
45
  // Replace "shiki" css variable naming with "astro".
46
46
  html = html.replace(/style="(background-)?color: var\(--shiki-/g, 'style="$1color: var(--astro-code-');
47
47
  // Handle code wrapping