summaryrefslogtreecommitdiff
path: root/src/build/special_box.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/build/special_box.mjs')
-rw-r--r--src/build/special_box.mjs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/build/special_box.mjs b/src/build/special_box.mjs
index 0b284ec..1457a98 100644
--- a/src/build/special_box.mjs
+++ b/src/build/special_box.mjs
@@ -10,6 +10,7 @@ export default function specialBox() {
if (node.type === 'containerDirective' && (
node.name === 'attention'
|| node.name === 'question'
+ || node.name === 'note'
|| node.name === 'information')) {
const data = node.data || (node.data = {});
@@ -18,6 +19,20 @@ export default function specialBox() {
className: 'special-box ' + node.name,
};
}
+ if (node.type === 'containerDirective' && node.name === 'details') {
+ if(node.children.length > 0 && node.children[0].type == "paragraph") {
+ node.children[0] = {
+ type: "containerDirective",
+ data: {
+ hName: 'summary'
+ },
+ children: node.children[0].children
+ };
+
+ const data = node.data || (node.data = {});
+ data.hName = 'details';
+ }
+ }
});
};
}