@seed-hypermedia/client 0.0.125 → 0.0.126
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.
|
@@ -788,7 +788,15 @@ function parseMarkdown(markdown, options = {}) {
|
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
const finalize = (nodes) => {
|
|
791
|
+
var _a2;
|
|
791
792
|
for (const n of nodes) {
|
|
793
|
+
const explicit = (_a2 = n.block.attributes) == null ? void 0 : _a2.childrenType;
|
|
794
|
+
if (typeof explicit === "string") {
|
|
795
|
+
const { childrenType: _childrenType, ...rest } = n.block.attributes;
|
|
796
|
+
n.block.childrenType = explicit;
|
|
797
|
+
if (Object.keys(rest).length) n.block.attributes = rest;
|
|
798
|
+
else delete n.block.attributes;
|
|
799
|
+
}
|
|
792
800
|
if (n.children.length && !n.block.childrenType && n.block.type !== "Table" && n.block.type !== "TableRow") {
|
|
793
801
|
n.block.childrenType = "Group";
|
|
794
802
|
}
|
package/dist/index.mjs
CHANGED