Skip to content

Commit 4db9a01

Browse files
committed
fix: Admonition titles now take all child nodes from paragraph parent, not just html elements (close #239)
1 parent cf6fe1f commit 4db9a01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ ${editor.getDoc().getSelection()}
422422
titleInnerEl.firstElementChild &&
423423
titleInnerEl.firstElementChild instanceof HTMLParagraphElement
424424
) {
425-
titleInnerEl.setChildrenInPlace([
426-
titleInnerEl.firstElementChild.firstChild
427-
]);
425+
titleInnerEl.setChildrenInPlace(
426+
Array.from(titleInnerEl.firstElementChild.childNodes)
427+
);
428428
}
429429
}
430430

0 commit comments

Comments
 (0)