diff --git a/.changeset/witty-dodos-guess.md b/.changeset/witty-dodos-guess.md new file mode 100644 index 000000000..b9ecf8c5c --- /dev/null +++ b/.changeset/witty-dodos-guess.md @@ -0,0 +1,6 @@ +--- +"myst-transforms": patch +"myst-cli": patch +--- + +Support details/summary in HTML diff --git a/packages/myst-transforms/src/html.ts b/packages/myst-transforms/src/html.ts index 39134b284..5eea6b535 100644 --- a/packages/myst-transforms/src/html.ts +++ b/packages/myst-transforms/src/html.ts @@ -137,6 +137,13 @@ const defaultHtmlToMdastOptions: Record = { const attrs = addClassAndIdentifier(node); return attrs.label ? h(node, 'cite', attrs, all(h, node)) : all(h, node); }, + details(h: H, node: any) { + const attrs = addClassAndIdentifier(node); + return h(node, 'details', attrs, all(h, node)); + }, + summary(h: H, node: any) { + return h(node, 'summary', all(h, node)); + }, }, };