Fixes #745
parent
c65173ec03
commit
c584bbeb0a
|
@ -39,7 +39,8 @@ function preprocess(t: ParseTree, options: MarkdownRenderOptions = {}) {
|
||||||
if (!node.type) {
|
if (!node.type) {
|
||||||
if (node.text?.startsWith("\n")) {
|
if (node.text?.startsWith("\n")) {
|
||||||
const prevNodeIdx = node.parent!.children!.indexOf(node) - 1;
|
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);
|
node.text = node.text.slice(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue