fumadocs-core 15.1.2 → 15.1.3
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/mdx-plugins/index.js +17 -0
- package/package.json +1 -1
|
@@ -483,6 +483,23 @@ function remarkStructure({
|
|
|
483
483
|
}
|
|
484
484
|
return "skip";
|
|
485
485
|
}
|
|
486
|
+
if (element.type === "mdxJsxFlowElement" && element.name) {
|
|
487
|
+
data.contents.push(
|
|
488
|
+
{
|
|
489
|
+
heading: lastHeading,
|
|
490
|
+
content: element.name
|
|
491
|
+
},
|
|
492
|
+
...element.attributes.flatMap((attribute) => {
|
|
493
|
+
const valueStr = typeof attribute.value === "string" ? attribute.value : attribute.value?.value;
|
|
494
|
+
if (!valueStr) return [];
|
|
495
|
+
return {
|
|
496
|
+
heading: lastHeading,
|
|
497
|
+
content: attribute.type === "mdxJsxAttribute" ? `${attribute.name}: ${valueStr}` : valueStr
|
|
498
|
+
};
|
|
499
|
+
})
|
|
500
|
+
);
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
486
503
|
if (types.includes(element.type)) {
|
|
487
504
|
const content = flattenNode(element).trim();
|
|
488
505
|
if (content.length === 0) return;
|