about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-02 16:45:36 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-02 16:45:36 +0200
commit76dd27fdf66195455af53cb7d7f090055467c9bc (patch)
treea32a7d8524299aa593c41c8ec60712c4ecff2302
parenta79a72ddbb34574f973ae51fa34a81b999073699 (diff)
downloadchawan-76dd27fdf66195455af53cb7d7f090055467c9bc.tar.gz
md2html: add trailing double space to <br> conversion
-rw-r--r--adapter/format/md2html.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/adapter/format/md2html.nim b/adapter/format/md2html.nim
index 5fb9bb9c..b14de97d 100644
--- a/adapter/format/md2html.nim
+++ b/adapter/format/md2html.nim
@@ -176,6 +176,8 @@ proc parseInline(line: openArray[char]) =
       append "<!--"
       i += 3
       state.incl(isComment)
+    elif c == '\n' and i >= 2 and line[i - 1] == ' ' and line[i - 2] == ' ':
+      append "<BR>"
     else:
       append c
     inc i