diff options
author | bptato <nincsnevem662@gmail.com> | 2024-12-14 20:46:07 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-12-14 20:46:07 +0100 |
commit | 467af1daedac8c508d1a2d8c4b1b70d445c2d7ca (patch) | |
tree | c1ddcc16f64f12c919f1cf57a54ec3bba205c59c | |
parent | 7e9c554a1f7185ea4095aadc587c5e66f184ee2e (diff) | |
download | chawan-467af1daedac8c508d1a2d8c4b1b70d445c2d7ca.tar.gz |
md2html: fix newline after list before EOF
-rw-r--r-- | adapter/format/md2html.nim | 2 | ||||
-rw-r--r-- | test/md/newline-after-list-before-eof.expected | 2 | ||||
-rw-r--r-- | test/md/newline-after-list-before-eof.md | 2 |
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 + |