cmark

My personal build of CMark ✏️

Commit
66e986ec02c417ba9387dbf906381bba598c3f00
Parent
6df2047d90d81e6269a37e7e6843211edf4ba3c6
Author
John MacFarlane <jgm@berkeley.edu>
Date

Rename CMARK_NODE_INLINE_CODE -> CMARK_NODE_CODE.

Diffstat

9 files changed, 17 insertions, 17 deletions

Status File Name N° Changes Insertions Deletions
Modified api_test/main.c 6 3 3
Modified man/man3/cmark.3 2 1 1
Modified src/cmark.h 4 2 2
Modified src/html.c 4 2 2
Modified src/inlines.c 2 1 1
Modified src/iterator.c 2 1 1
Modified src/man.c 4 2 2
Modified src/node.c 8 4 4
Modified src/print.c 2 1 1
diff --git a/api_test/main.c b/api_test/main.c
@@ -26,7 +26,7 @@ static const cmark_node_type node_types[] = {
 	CMARK_NODE_TEXT,
 	CMARK_NODE_SOFTBREAK,
 	CMARK_NODE_LINEBREAK,
-	CMARK_NODE_INLINE_CODE,
+	CMARK_NODE_CODE,
 	CMARK_NODE_INLINE_HTML,
 	CMARK_NODE_EMPH,
 	CMARK_NODE_STRONG,
@@ -426,7 +426,7 @@ hierarchy(test_batch_runner *runner)
 		(1 << CMARK_NODE_TEXT) |
 		(1 << CMARK_NODE_SOFTBREAK) |
 		(1 << CMARK_NODE_LINEBREAK) |
-		(1 << CMARK_NODE_INLINE_CODE) |
+		(1 << CMARK_NODE_CODE) |
 		(1 << CMARK_NODE_INLINE_HTML) |
 		(1 << CMARK_NODE_EMPH) |
 		(1 << CMARK_NODE_STRONG) |
@@ -445,7 +445,7 @@ hierarchy(test_batch_runner *runner)
 	test_content(runner, CMARK_NODE_TEXT,	       0);
 	test_content(runner, CMARK_NODE_SOFTBREAK,     0);
 	test_content(runner, CMARK_NODE_LINEBREAK,     0);
-	test_content(runner, CMARK_NODE_INLINE_CODE,   0);
+	test_content(runner, CMARK_NODE_CODE,   0);
 	test_content(runner, CMARK_NODE_INLINE_HTML,   0);
 	test_content(runner, CMARK_NODE_EMPH,          all_inlines);
 	test_content(runner, CMARK_NODE_STRONG,        all_inlines);
diff --git a/man/man3/cmark.3 b/man/man3/cmark.3
@@ -1,4 +1,4 @@
-.TH cmark 3 "December 13, 2014" "LOCAL" "Library Functions Manual"
+.TH cmark 3 "December 14, 2014" "LOCAL" "Library Functions Manual"
 .SH
 NAME
 .PP
diff --git a/src/cmark.h b/src/cmark.h
@@ -54,7 +54,7 @@ typedef enum {
 	CMARK_NODE_TEXT,
 	CMARK_NODE_SOFTBREAK,
 	CMARK_NODE_LINEBREAK,
-	CMARK_NODE_INLINE_CODE,
+	CMARK_NODE_CODE,
 	CMARK_NODE_INLINE_HTML,
 	CMARK_NODE_EMPH,
 	CMARK_NODE_STRONG,
@@ -423,7 +423,7 @@ char *cmark_render_man(cmark_node *root);
   #define NODE_TEXT                 CMARK_NODE_TEXT
   #define NODE_SOFTBREAK            CMARK_NODE_SOFTBREAK
   #define NODE_LINEBREAK            CMARK_NODE_LINEBREAK
-  #define NODE_INLINE_CODE          CMARK_NODE_INLINE_CODE
+  #define NODE_CODE                 CMARK_NODE_CODE
   #define NODE_INLINE_HTML          CMARK_NODE_INLINE_HTML
   #define NODE_EMPH                 CMARK_NODE_EMPH
   #define NODE_STRONG               CMARK_NODE_STRONG
diff --git a/src/html.c b/src/html.c
@@ -59,7 +59,7 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, void *vstate)
 	if (state->plain != NULL) {
 		switch(node->type) {
 		case CMARK_NODE_TEXT:
-		case CMARK_NODE_INLINE_CODE:
+		case CMARK_NODE_CODE:
 		case CMARK_NODE_INLINE_HTML:
 			escape_html(html, node->as.literal.data,
 				    node->as.literal.len);
@@ -197,7 +197,7 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, void *vstate)
 		strbuf_putc(html, '\n');
 		break;
 
-	case CMARK_NODE_INLINE_CODE:
+	case CMARK_NODE_CODE:
 		strbuf_puts(html, "<code>");
 		escape_html(html, node->as.literal.data, node->as.literal.len);
 		strbuf_puts(html, "</code>");
diff --git a/src/inlines.c b/src/inlines.c
@@ -16,7 +16,7 @@
 
 // Macros for creating various kinds of simple.
 #define make_str(s) make_literal(CMARK_NODE_TEXT, s)
-#define make_code(s) make_literal(CMARK_NODE_INLINE_CODE, s)
+#define make_code(s) make_literal(CMARK_NODE_CODE, s)
 #define make_raw_html(s) make_literal(CMARK_NODE_INLINE_HTML, s)
 #define make_linebreak() make_simple(CMARK_NODE_LINEBREAK)
 #define make_softbreak() make_simple(CMARK_NODE_SOFTBREAK)
diff --git a/src/iterator.c b/src/iterator.c
@@ -40,7 +40,7 @@ int S_is_leaf(cmark_node *node)
 	case CMARK_NODE_TEXT:
 	case CMARK_NODE_SOFTBREAK:
 	case CMARK_NODE_LINEBREAK:
-	case CMARK_NODE_INLINE_CODE:
+	case CMARK_NODE_CODE:
 	case CMARK_NODE_INLINE_HTML:
 		return 1;
 	default:
diff --git a/src/man.c b/src/man.c
@@ -58,7 +58,7 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, void *vstate)
 	if (state->plain != NULL) {
 		switch(node->type) {
 		case CMARK_NODE_TEXT:
-		case CMARK_NODE_INLINE_CODE:
+		case CMARK_NODE_CODE:
 		case CMARK_NODE_INLINE_HTML:
 			escape_man(man, node->as.literal.data,
 				    node->as.literal.len);
@@ -174,7 +174,7 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, void *vstate)
 		strbuf_putc(man, '\n');
 		break;
 
-	case CMARK_NODE_INLINE_CODE:
+	case CMARK_NODE_CODE:
 		strbuf_puts(man, "\\f[C]");
 		escape_man(man, node->as.literal.data, node->as.literal.len);
 		strbuf_puts(man, "\\f[]");
diff --git a/src/node.c b/src/node.c
@@ -45,7 +45,7 @@ void S_free_nodes(cmark_node *e)
 			break;
 		case NODE_TEXT:
 		case NODE_INLINE_HTML:
-		case NODE_INLINE_CODE:
+		case NODE_CODE:
 			chunk_free(&e->as.literal);
 			break;
 		case NODE_LINK:
@@ -105,7 +105,7 @@ S_type_string(cmark_node *node)
 	case CMARK_NODE_TEXT:          return "TEXT";
 	case CMARK_NODE_SOFTBREAK:     return "SOFTBREAK";
 	case CMARK_NODE_LINEBREAK:     return "LINEBREAK";
-	case CMARK_NODE_INLINE_CODE:   return "INLINE_CODE";
+	case CMARK_NODE_CODE:          return "CODE";
 	case CMARK_NODE_INLINE_HTML:   return "INLINE_HTML";
 	case CMARK_NODE_EMPH:          return "EMPH";
 	case CMARK_NODE_STRONG:        return "STRONG";
@@ -187,7 +187,7 @@ cmark_node_get_string_content(cmark_node *node) {
 
 	case NODE_TEXT:
 	case NODE_INLINE_HTML:
-	case NODE_INLINE_CODE:
+	case NODE_CODE:
 		return chunk_to_cstr(&node->as.literal);
 
 	default:
@@ -211,7 +211,7 @@ cmark_node_set_string_content(cmark_node *node, const char *content) {
 
 	case NODE_TEXT:
 	case NODE_INLINE_HTML:
-	case NODE_INLINE_CODE:
+	case NODE_CODE:
 		chunk_set_cstr(&node->as.literal, content);
 		return 1;
 
diff --git a/src/print.c b/src/print.c
@@ -99,7 +99,7 @@ static void render_nodes(strbuf* buffer, cmark_node* node, int indent)
 		case NODE_SOFTBREAK:
 			strbuf_printf(buffer, "softbreak\n");
 			break;
-		case NODE_INLINE_CODE:
+		case NODE_CODE:
 			strbuf_printf(buffer, "code ");
 			print_str(buffer, node->as.literal.data, node->as.literal.len);
 			strbuf_putc(buffer, '\n');