From 2996ee9afd5c5680165f725a107074abba8ffa56 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 16 Oct 2026 17:59:29 -1000 Subject: Run a paragraph's lines together like GitHub GitHub shows a single newline in a markdown file as a space, and roff fills the lines of a man page the same way, so text wrapped in the source came out ragged on the about page. --- tests/extensions/test-about-render.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tests/extensions/test-about-render.lua') diff --git a/tests/extensions/test-about-render.lua b/tests/extensions/test-about-render.lua index 801cc45..b7d12c7 100644 --- a/tests/extensions/test-about-render.lua +++ b/tests/extensions/test-about-render.lua @@ -88,10 +88,17 @@ out = render("readme.markdown", "# Long") h.contains("the long markdown extension dispatches too", out, "

Long

") out = render("README.md", "line one\nline two") -h.contains("a paragraph keeps its line break", out, "

line one
line two

") +h.contains("the lines of a paragraph run together", out, "

line one\nline two

") out = render("README.md", "first para\r\nsecond line") -h.contains("crlf line endings are normalised", out, "

first para
second line

") +h.contains("crlf line endings are normalised", out, "

first para\nsecond line

") + +out = render("README.md", "one \ntwo\\\nthree") +h.contains("two trailing spaces break the line", out, "

one
\ntwo") +h.contains("a trailing backslash breaks the line", out, "two
\nthree

") + +out = render("README.md", "spaces \n\nslash\\") +h.contains("the last line takes no break", out, "

spaces

slash\\

") out = render("README.md", "a **bold** and *leaning* word") h.contains("double stars embolden", out, "bold") @@ -239,7 +246,7 @@ out = render("page.3", ".SS Details") h.contains("a subsection renders one level down", out, "

Details

") out = render("page.1", ".B bold words\nplain after") -h.contains("the bold macro renders strong", out, "

bold words
plain after

") +h.contains("the bold macro renders strong", out, "

bold words\nplain after

") out = render("page.1", "a \\fBbold\\fR c") h.contains("font escapes carry across a run", out, "

a bold c

") -- cgit