prevent double blank lines after markdown code blocks (#173)

This commit is contained in:
Markus Ylisiurunen 2025-12-13 03:04:49 +02:00 committed by GitHub
parent 36dbb2410e
commit db886746b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 35 additions and 1 deletions

View file

@ -267,7 +267,9 @@ export class Markdown implements Component {
lines.push(" " + this.theme.codeBlock(codeLine));
}
lines.push(this.theme.codeBlockBorder("```"));
lines.push(""); // Add spacing after code blocks
if (nextTokenType !== "space") {
lines.push(""); // Add spacing after code blocks (unless space token follows)
}
break;
}