diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-06-01 14:58:58 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-06-01 14:58:58 -0700 |
commit | 60bd289c18e06e199260ee374ef29e3017bc4a90 (patch) | |
tree | 0785dcf68fc575fbc5bb9a73b7872c2ccd4d1b5a /src/commonmark.c | |
parent | be020e1928f2d0750573730483dd4cb40140935a (diff) |
renderer: no_linebreaks instead of no_wrap.
We generally want this option to prohibit any breaking
in things like headers (not just wraps, but softbreaks).
Diffstat (limited to 'src/commonmark.c')
-rw-r--r-- | src/commonmark.c | 10 |
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); |