fumadocs-core 16.19.4 → 16.19.5

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.
@@ -283,7 +283,8 @@ function createContentStorageBuilder(loaderConfig) {
283
283
  };
284
284
  if (inputFile.dataAt) metaDataAt.set(file, inputFile.dataAt);
285
285
  }
286
- const [storageKey, locale = i18n ? i18n.defaultLanguage : EmptyLang] = i18n && inputFile.locale ? [path, inputFile.locale] : parser(path);
286
+ const [key, locale = i18n ? i18n.defaultLanguage : EmptyLang] = i18n && inputFile.locale ? [inputFile.path, inputFile.locale] : parser(normalize(inputFile.path));
287
+ const storageKey = normalize(source.baseDir ? `${source.baseDir}/${key}` : key);
287
288
  if (files) for (const item of files) add(storageKey, locale, item);
288
289
  else add(storageKey, locale, file);
289
290
  }
@@ -1,7 +1,7 @@
1
1
  import { remarkGfm } from "./remark-gfm.js";
2
2
  import { rehypeCode, rehypeCodeDefaultOptions } from "./rehype-code.js";
3
3
  import { remarkImage } from "./remark-image.js";
4
- import { i as transformerTab } from "../rehype-code.core-DNLXo8St.js";
4
+ import { i as transformerTab } from "../rehype-code.core-6imPTPeR.js";
5
5
  import { transformerIcon } from "./transformer-icon.js";
6
6
  import { extractCodeRegion, remarkInclude } from "./remark-include.js";
7
7
  import { n as remarkStructureDefaultOptions, r as structure, t as remarkStructure } from "../remark-structure-DUU7_xF1.js";
@@ -1,3 +1,3 @@
1
- import { i as transformerTab, n as rehypeCodeDefaultOptions, r as rehypeCodeFromHighlighter, t as createRehypeCode } from "../rehype-code.core-DNLXo8St.js";
1
+ import { i as transformerTab, n as rehypeCodeDefaultOptions, r as rehypeCodeFromHighlighter, t as createRehypeCode } from "../rehype-code.core-6imPTPeR.js";
2
2
  import { transformerIcon } from "./transformer-icon.js";
3
3
  export { createRehypeCode, rehypeCodeDefaultOptions, rehypeCodeFromHighlighter, transformerIcon, transformerTab };
@@ -1,5 +1,5 @@
1
1
  import { defaultShikiFactory, wasmShikiFactory } from "../highlight/shiki/full.js";
2
- import { i as transformerTab, n as rehypeCodeDefaultOptions$1, t as createRehypeCode } from "../rehype-code.core-DNLXo8St.js";
2
+ import { i as transformerTab, n as rehypeCodeDefaultOptions$1, t as createRehypeCode } from "../rehype-code.core-6imPTPeR.js";
3
3
  import { transformerIcon } from "./transformer-icon.js";
4
4
  // src/mdx-plugins/rehype-code.ts
5
5
  const rehypeCodeDefaultOptions = {
@@ -526,7 +526,11 @@ function createRehypeCode(highlighterFactory) {
526
526
  return {
527
527
  ...shiki,
528
528
  codeToHast(code, options) {
529
- if (!isSpecialLang(options.lang)) highlighter.getLanguage(options.lang);
529
+ if (!isSpecialLang(options.lang)) try {
530
+ highlighter.getLanguage(options.lang);
531
+ } catch (error) {
532
+ throw new Error(`Unknown language "${options.lang}" in a code block. Correct it, or set \`fallbackLanguage: 'plaintext'\` in the Rehype Code options.`, { cause: error });
533
+ }
530
534
  return shiki.codeToHast(code, options);
531
535
  }
532
536
  };
@@ -1 +1 @@
1
- export { t as dynamicLoader } from "../dynamic-BOCEF-LU.js";
1
+ export { t as dynamicLoader } from "../dynamic-DuFpoLBl.js";
@@ -1,4 +1,4 @@
1
- import { a as isDynamicPath, c as FileSystem, i as getStaticParams, n as createGetUrl, o as multiple, r as loader, s as update, t as dynamicLoader } from "../dynamic-BOCEF-LU.js";
1
+ import { a as isDynamicPath, c as FileSystem, i as getStaticParams, n as createGetUrl, o as multiple, r as loader, s as update, t as dynamicLoader } from "../dynamic-DuFpoLBl.js";
2
2
  import { getSlugs } from "./plugins/slugs.js";
3
3
  import { o as path_exports } from "../path-B8old5-F.js";
4
4
  import { llms } from "./llms.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-core",
3
- "version": "16.19.4",
3
+ "version": "16.19.5",
4
4
  "description": "The React.js library for building a documentation website",
5
5
  "keywords": [
6
6
  "Docs",