cmark

My personal build of CMark ✏️

Commit
8032d6572d6833e201468ba87b78fba604ef7147
Parent
cb8e0d5cac88e5f1151826833b6d6186fedbd4fc
Author
John MacFarlane <jgm@berkeley.edu>
Date

commonmark renderer - honor softbreak if width == 0.

Diffstat

1 file changed, 5 insertions, 1 deletion

Status File Name N° Changes Insertions Deletions
Modified src/commonmark.c 6 5 1
diff --git 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: