cmark

My personal build of CMark ✏️

Commit
641182ef14b9b4dadb1b3b466a40d85da7a25725
Parent
46330867a8d82bf45f2ea575b93c5f0d4496ca0c
Author
John MacFarlane <jgm@berkeley.edu>
Date

Fixed some windows warnings.

Diffstat

1 file changed, 6 insertions, 6 deletions

Status File Name N° Changes Insertions Deletions
Modified src/commonmark.c 12 6 6
diff --git a/src/commonmark.c b/src/commonmark.c
@@ -172,8 +172,8 @@ S_render_node(cmark_node *node, cmark_event_type ev_type,
 	int numticks;
 	int i;
 	bool entering = (ev_type == CMARK_EVENT_ENTER);
-	size_t info_len;
-	size_t code_len;
+	const char *info, *code, *title;
+	size_t info_len, code_len;
 	cmark_strbuf listmarker = GH_BUF_INIT;
 	char *emph_delim;
 	bufsize_t marker_width;
@@ -279,9 +279,9 @@ S_render_node(cmark_node *node, cmark_event_type ev_type,
 
 	case CMARK_NODE_CODE_BLOCK:
 		BLANKLINE();
-		const char* info = cmark_node_get_fence_info(node);
+		info = cmark_node_get_fence_info(node);
 		info_len = safe_strlen(info);
-		const char* code = cmark_node_get_literal(node);
+		code = cmark_node_get_literal(node);
 		code_len = safe_strlen(code);
 		// use indented form if no info, and code doesn't
 		// begin or end with a blank line, and code isn't
@@ -422,7 +422,7 @@ S_render_node(cmark_node *node, cmark_event_type ev_type,
 			} else {
 				LIT("](");
 				OUT(cmark_node_get_url(node), false, URL);
-				const char* title = cmark_node_get_title(node);
+				title = cmark_node_get_title(node);
 				if (safe_strlen(title) > 0) {
 					LIT(" \"");
 					OUT(title, false, TITLE);
@@ -439,7 +439,7 @@ S_render_node(cmark_node *node, cmark_event_type ev_type,
 		} else {
 			LIT("](");
 			OUT(cmark_node_get_url(node), false, URL);
-			const char* title = cmark_node_get_title(node);
+			title = cmark_node_get_title(node);
 			if (safe_strlen(title) > 0) {
 				OUT(" \"", true, LITERAL);
 				OUT(title, false, TITLE);