@astrojs/markdown-remark 4.3.1 → 4.3.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.
Files changed (2) hide show
  1. package/dist/shiki.js +2 -2
  2. package/package.json +1 -1
package/dist/shiki.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bundledLanguages, createCssVariablesTheme, getHighlighter } from "shiki";
1
+ import { bundledLanguages, createCssVariablesTheme, getHighlighter, isSpecialLang } from "shiki";
2
2
  import { visit } from "unist-util-visit";
3
3
  const ASTRO_COLOR_REPLACEMENTS = {
4
4
  "--astro-code-foreground": "--astro-code-color-text",
@@ -25,7 +25,7 @@ async function createShikiHighlighter({
25
25
  const loadedLanguages = highlighter.getLoadedLanguages();
26
26
  return {
27
27
  highlight(code, lang = "plaintext", options) {
28
- if (lang !== "plaintext" && !loadedLanguages.includes(lang)) {
28
+ if (!isSpecialLang(lang) && !loadedLanguages.includes(lang)) {
29
29
  console.warn(`[Shiki] The language "${lang}" doesn't exist, falling back to "plaintext".`);
30
30
  lang = "plaintext";
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/markdown-remark",
3
- "version": "4.3.1",
3
+ "version": "4.3.2",
4
4
  "type": "module",
5
5
  "author": "withastro",
6
6
  "license": "MIT",