cmark

My personal build of CMark ✏️

Commit
0f7233e073a32c15bdde476edcd04b6d395278b4
Parent
ab5666eae00102f0ea7753f6c449e9778b14287b
Author
John MacFarlane <jgm@berkeley.edu>
Date

Removed "add newline if line doesn't have one."

This isn't actually needed.

Diffstat

1 file changed, 0 insertions, 7 deletions

Status File Name N° Changes Insertions Deletions
Modified src/blocks.c 7 0 7
diff --git a/src/blocks.c b/src/blocks.c
@@ -582,13 +582,6 @@ S_process_line(cmark_parser *parser, const unsigned char *buffer, bufsize_t byte
 	parser->offset = 0;
 	parser->blank = false;
 
-	// Add a newline to the end if not present:
-	// TODO this breaks abstraction:
-	if (parser->curline->size > 0 &&
-	    !S_is_line_end_char(parser->curline->ptr[parser->curline->size - 1])) {
-		cmark_strbuf_putc(parser->curline, '\n');
-	}
-
 	input.data = parser->curline->ptr;
 	input.len = parser->curline->size;