This commit is contained in:
Zef Hemel
2024-03-02 13:09:05 +01:00
parent c65173ec03
commit c584bbeb0a
+2 -1
View File
@@ -39,7 +39,8 @@ function preprocess(t: ParseTree, options: MarkdownRenderOptions = {}) {
if (!node.type) {
if (node.text?.startsWith("\n")) {
const prevNodeIdx = node.parent!.children!.indexOf(node) - 1;
if (node.parent!.children![prevNodeIdx]?.type !== "Paragraph") {
const prevNodeType = node.parent!.children![prevNodeIdx]?.type;
if (prevNodeType?.includes("Heading")) {
node.text = node.text.slice(1);
}
}