about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--adapter/format/md2html.nim2
-rw-r--r--test/md/newline-after-list-before-eof.expected2
-rw-r--r--test/md/newline-after-list-before-eof.md2
3 files changed, 5 insertions, 1 deletions
diff --git a/adapter/format/md2html.nim b/adapter/format/md2html.nim
index 35667c5b..69896fcf 100644
--- a/adapter/format/md2html.nim
+++ b/adapter/format/md2html.nim
@@ -655,7 +655,7 @@ proc parseComment(state: var ParseState; line: string) =
     stdout.write(line & '\n')
 
 proc readLine(state: var ParseState; line: var string): bool =
-  let hadLine = line != ""
+  let hadLine = line != "" or state.blockType == btList
   if stdin.readLine(line):
     return true
   line = ""
diff --git a/test/md/newline-after-list-before-eof.expected b/test/md/newline-after-list-before-eof.expected
new file mode 100644
index 00000000..5f9a933d
--- /dev/null
+++ b/test/md/newline-after-list-before-eof.expected
@@ -0,0 +1,2 @@
+
+  • test
diff --git a/test/md/newline-after-list-before-eof.md b/test/md/newline-after-list-before-eof.md
new file mode 100644
index 00000000..4d311748
--- /dev/null
+++ b/test/md/newline-after-list-before-eof.md
@@ -0,0 +1,2 @@
+* test
+