Skip to content

Commit edbef93

Browse files
Fix code block blank-line preservation in Beehiiv converter (#125)
### Motivation - Preserve intentional empty lines inside fenced code blocks which were being stripped because `convertMarkdownToBeehiiv` collapsed consecutive newlines at the end of conversion. ### Description - Removed the final global newline-collapsing call (`return html.replace(/\n{2,}/g, '\n')`) so the generated HTML is returned unchanged and blank lines inside `<pre><code>` are preserved. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69cbbbb08130832580b1c4dcb74c2185)
1 parent c03c9da commit edbef93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vscode-to-beehiiv.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ <h2>Beehiiv output</h2>
287287
});
288288

289289
const html = `<head><meta charset="UTF-8"></head>${blocks.join('')}`;
290-
return html.replace(/\n{2,}/g, '\n');
290+
return html;
291291
};
292292

293293
const renderOutput = () => {

0 commit comments

Comments
 (0)