@vxrn/mdx 1.1.321 → 1.1.322
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/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.native.js +3 -2
- package/dist/index.native.js.map +2 -2
- package/package.json +1 -1
- package/src/getHeadings.ts +1 -1
- package/src/getMDXBySlug.tsx +2 -1
- package/src/index.ts +2 -3
- package/types/getMDXBySlug.d.ts +1 -1
- package/types/getMDXBySlug.d.ts.map +1 -1
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
package/dist/index.js
CHANGED
|
@@ -7573,7 +7573,7 @@ var getTitle = (source) => source.replace(/^\#+\s+/, "").replace(/\<.*\>/, " "),
|
|
|
7573
7573
|
`).filter((x) => x.startsWith("#")).map((x) => ({
|
|
7574
7574
|
title: getTitle(x),
|
|
7575
7575
|
priority: x.trim().split(" ")[0].length,
|
|
7576
|
-
id: `#${getTitle(x).replace(/\s
|
|
7576
|
+
id: `#${getTitle(x).replace(/\s+/g, "-").toLowerCase()}`
|
|
7577
7577
|
}));
|
|
7578
7578
|
|
|
7579
7579
|
// src/getAllFrontmatter.tsx
|
|
@@ -17982,11 +17982,12 @@ var getMDXBySlug = async (basePath, slug2) => {
|
|
|
17982
17982
|
code
|
|
17983
17983
|
};
|
|
17984
17984
|
};
|
|
17985
|
-
async function getMDX(source) {
|
|
17985
|
+
async function getMDX(source, extraPlugins) {
|
|
17986
17986
|
return await (0, import_mdx_bundler.bundleMDX)({
|
|
17987
17987
|
source,
|
|
17988
17988
|
mdxOptions(options2) {
|
|
17989
17989
|
let plugins = [
|
|
17990
|
+
...extraPlugins || [],
|
|
17990
17991
|
...options2.rehypePlugins ?? [],
|
|
17991
17992
|
rehypeMetaAttribute_default,
|
|
17992
17993
|
rehypeHighlightCode,
|