From 5dba9e685d3491e55bd10a698adaf28bb4d44cd2 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sun, 29 Mar 2015 16:43:13 -0700
Subject: commonmark - use space after delim if code is empty.

---
 src/commonmark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/commonmark.c')

diff --git a/src/commonmark.c b/src/commonmark.c
index 180ff18..640779d 100644
--- a/src/commonmark.c
+++ b/src/commonmark.c
@@ -416,7 +416,7 @@ S_render_node(cmark_node *node, cmark_event_type ev_type,
 		for (i = 0; i < numticks; i++) {
 			lit(state, "`", false);
 		}
-		if (code->data[0] == '`') {
+		if (code->len <= 1 || code->data[0] == '`') {
 			lit(state, " ", false);
 		}
 		out(state, node->as.literal, true, LITERAL);
-- 
cgit v1.2.3