diff --git a/client/markdown_renderer/html_render.ts b/client/markdown_renderer/html_render.ts index 49a1175c..b831fd82 100644 --- a/client/markdown_renderer/html_render.ts +++ b/client/markdown_renderer/html_render.ts @@ -19,7 +19,7 @@ export function htmlEscape(s: string): string { .replace(//g, ">") .replace(/"/g, """) - .replace(/\n/g, "
"); + .replace(/\n/g, "
"); let oldS = s; do { diff --git a/client/markdown_renderer/markdown_render.test.ts b/client/markdown_renderer/markdown_render.test.ts index e9c892cf..160e2194 100644 --- a/client/markdown_renderer/markdown_render.test.ts +++ b/client/markdown_renderer/markdown_render.test.ts @@ -99,7 +99,7 @@ test("Smart hard break test", () => { smartHardBreak: true, }); expect(html).toEqual( - `Hello
world!
`, + `Hello
world!
`, ); const example2 = `This is going to be a text. With a new line. diff --git a/client/space_lua/render_lua_markdown.test.ts b/client/space_lua/render_lua_markdown.test.ts index f81cf49f..be7d2780 100644 --- a/client/space_lua/render_lua_markdown.test.ts +++ b/client/space_lua/render_lua_markdown.test.ts @@ -331,7 +331,7 @@ test("nested scalar array in table cell renders as br-separated lines", async () await tbl.rawSet(1, row); const r = renderResultToMarkdown(tbl); - expect(r.markdown).toContain("aaa
bbb"); + expect(r.markdown).toContain("aaa
bbb"); }); // ── Markdown in cell values ───────────────────────────────────────── @@ -427,7 +427,7 @@ test("e2e: scalar list renders each item on its own line", async () => { await tbl.rawSet(3, "third"); expect(toHtml(tbl)).toBe( - 'first
second
third
', + 'first
second
third
', ); }); @@ -438,7 +438,7 @@ test("e2e: list with wiki links", async () => { expect(toHtml(tbl)).toBe( '' + - 'PageA
' + + 'PageA
' + 'PageB
', ); }); @@ -487,7 +487,7 @@ test("e2e: nested array in table cell renders as br-separated lines", async () = expect(toHtml(tbl)).toBe( "" + '' + - '
namehello
Supaaa
bbb
', + 'aaa
bbb', ); }); diff --git a/client/space_lua/render_lua_markdown.ts b/client/space_lua/render_lua_markdown.ts index 21e2ddec..55f6b124 100644 --- a/client/space_lua/render_lua_markdown.ts +++ b/client/space_lua/render_lua_markdown.ts @@ -204,7 +204,7 @@ function renderArrayToMarkdown(items: any[]): string { } function renderArrayToHtmlLines(items: any[]): string { - return items.map((item) => renderCellContent(item)).join("
"); + return items.map((item) => renderCellContent(item)).join("
"); } /**