summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-03-29 17:46:51 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-03-29 17:46:51 -0700
commit8032d6572d6833e201468ba87b78fba604ef7147 (patch)
tree8282a119e2648c6c7a7bde6d98fe24ab107cfe5f /src
parentcb8e0d5cac88e5f1151826833b6d6186fedbd4fc (diff)
commonmark renderer - honor softbreak if width == 0.
Diffstat (limited to 'src')
-rw-r--r--src/commonmark.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/commonmark.c b/src/commonmark.c
index c266bf6..f41c9ee 100644
--- a/src/commonmark.c
+++ b/src/commonmark.c
@@ -404,7 +404,11 @@ S_render_node(cmark_node *node, cmark_event_type ev_type,
break;
case CMARK_NODE_SOFTBREAK:
- lit(state, " ", true);
+ if (state->width == 0) {
+ cr(state);
+ } else {
+ lit(state, " ", true);
+ }
break;
case CMARK_NODE_CODE: