summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: