cmark

My personal build of CMark ✏️

Commit
0f90fc3f7ec06dd032ab28ef0478c415f831862f
Parent
2f4cbcb9957a2840735a547cc846eeb566262a44
Author
John MacFarlane <jgm@berkeley.edu>
Date

Moved a test outside a loop.

Diffstat

1 file changed, 6 insertions, 4 deletions

Status File Name N° Changes Insertions Deletions
Modified src/inlines.c 10 6 4
diff --git a/src/inlines.c b/src/inlines.c
@@ -277,11 +277,13 @@ scan_delims(subject* subj, unsigned char c, bool * can_open, bool * can_close)
 		}
 	}
 
-	while (peek_char(subj) == c) {
+	if (c == '\'' || c == '"') {
 		numdelims++;
-		advance(subj);
-		if (c == '\'' || c == '"') {
-			break;  // limit to 1 delim for quotes
+		advance(subj);  // limit to 1 delim for quotes
+	} else {
+		while (peek_char(subj) == c) {
+			numdelims++;
+			advance(subj);
 		}
 	}