summaryrefslogtreecommitdiff
path: root/src/commonmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commonmark.c')
-rw-r--r--src/commonmark.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/commonmark.c b/src/commonmark.c
index 9f971b2..42a5f19 100644
--- a/src/commonmark.c
+++ b/src/commonmark.c
@@ -258,9 +258,9 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node,
}
LIT(" ");
renderer->begin_content = true;
- renderer->no_wrap = true;
+ renderer->no_linebreaks = true;
} else {
- renderer->no_wrap = false;
+ renderer->no_linebreaks = false;
BLANKLINE();
}
break;
@@ -343,8 +343,10 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node,
if (CMARK_OPT_HARDBREAKS & options) {
LIT(" ");
CR();
- } else if (renderer->width == 0 && !(CMARK_OPT_HARDBREAKS & options) &&
- !(CMARK_OPT_NOBREAKS & options)) {
+ } else if (!renderer->no_linebreaks &&
+ renderer->width == 0 &&
+ !(CMARK_OPT_HARDBREAKS & options) &&
+ !(CMARK_OPT_NOBREAKS & options)) {
CR();
} else {
OUT(" ", allow_wrap, LITERAL);