summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-07-12 17:40:15 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-07-12 17:40:15 -0700
commitadfae46c7144eb65532e10961420f2ef58cac4ed (patch)
tree2c19203354101ff34e525392d3e2aa830a765230
parentc5e64712336b9707858bd71c7287c6fd6281545c (diff)
Fixed soft breaks in commonmark writer.
-rw-r--r--src/commonmark.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commonmark.c b/src/commonmark.c
index dbb1910..088b934 100644
--- a/src/commonmark.c
+++ b/src/commonmark.c
@@ -341,7 +341,8 @@ S_render_node(cmark_renderer *renderer,
break;
case CMARK_NODE_SOFTBREAK:
- if (CMARK_OPT_HARDBREAKS & options) {
+ if (renderer->width == 0 &&
+ !(CMARK_OPT_HARDBREAKS & options)) {
CR();
} else {
OUT(" ", true, LITERAL);