summaryrefslogtreecommitdiff
path: root/src/commonmark.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-03-29 16:43:13 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-03-29 16:43:13 -0700
commit5dba9e685d3491e55bd10a698adaf28bb4d44cd2 (patch)
tree56aa513bf8d7c09071797d2e3fccf2a411c03c38 /src/commonmark.c
parente345fd465ac5920cd78315883a76f4bafbaec71f (diff)
commonmark - use space after delim if code is empty.
Diffstat (limited to 'src/commonmark.c')
-rw-r--r--src/commonmark.c2
1 files changed, 1 insertions, 1 deletions
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);