diff --git a/frontend/app.js b/frontend/app.js
index 8595b8b..83f482d 100644
--- a/frontend/app.js
+++ b/frontend/app.js
@@ -800,9 +800,17 @@ function noteApp() {
// Links [text](url)
html = html.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '[$1]($2)');
- // Lists
- html = html.replace(/^(\s*)([-*+])\s/gm, '$1$2 ');
- html = html.replace(/^(\s*)(\d+\.)\s/gm, '$1$2 ');
+ // Lists - use [ \t] instead of \s to avoid matching newlines
+ // Capture rest of line to handle empty bullets properly (issue #142)
+ html = html.replace(/^(\s*)([-*+])[ \t](.*)$/gm, (match, indent, bullet, rest) => {
+ // If rest is empty/whitespace-only, add zero-width space to prevent line collapse
+ const content = rest.trim() === '' ? '\u200B' : rest;
+ return `${indent}${bullet} ${content}`;
+ });
+ html = html.replace(/^(\s*)(\d+\.)[ \t](.*)$/gm, (match, indent, bullet, rest) => {
+ const content = rest.trim() === '' ? '\u200B' : rest;
+ return `${indent}${bullet} ${content}`;
+ });
// Blockquotes
html = html.replace(/^(>.*)$/gm, '$1');