Commit dc3dde78c89a676133bc213a2fe1c57b681bf9d7

Martin Mitas 2017-08-28T16:14:04

render_html: Add a new line after <ol>. This makes the behavior more consistent with <ul>.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/md2html/render_html.c b/md2html/render_html.c
index 6f91d0d..25bb38f 100644
--- a/md2html/render_html.c
+++ b/md2html/render_html.c
@@ -259,11 +259,11 @@ render_open_ol_block(MD_RENDER_HTML* r, const MD_BLOCK_OL_DETAIL* det)
     char buf[64];
 
     if(det->start == 1) {
-        RENDER_LITERAL(r, "<ol>");
+        RENDER_LITERAL(r, "<ol>\n");
         return;
     }
 
-    snprintf(buf, sizeof(buf), "<ol start=\"%u\">", det->start);
+    snprintf(buf, sizeof(buf), "<ol start=\"%u\">\n", det->start);
     RENDER_LITERAL(r, buf);
 }