cmark

My personal build of CMark ✏️

Commit
adfae46c7144eb65532e10961420f2ef58cac4ed
Parent
c5e64712336b9707858bd71c7287c6fd6281545c
Author
John MacFarlane <jgm@berkeley.edu>
Date

Fixed soft breaks in commonmark writer.

Diffstat

1 file changed, 2 insertions, 1 deletion

Status File Name N° Changes Insertions Deletions
Modified src/commonmark.c 3 2 1
diff --git 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);