Skip to content

Commit 3e27b7c

Browse files
Normalize consecutive newlines in Beehiiv output (#118)
### Motivation - Prevent the generated Beehiiv HTML from containing repeated blank lines by collapsing consecutive newline runs into a single newline. ### Description - In `vscode-to-beehiiv.html` update `convertMarkdownToBeehiiv` to assemble the final HTML into a local `html` variable and return `html.replace(/\n{2,}/g, '\n')` so consecutive `\n` runs are collapsed. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69a1afc696188325b90b24eb572f8200)
1 parent f11e994 commit 3e27b7c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

vscode-to-beehiiv.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ <h2>Beehiiv output</h2>
271271
}
272272
});
273273

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

277278
const renderOutput = () => {

0 commit comments

Comments
 (0)