summaryrefslogtreecommitdiff
path: root/src/node.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-22 22:07:38 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-22 22:18:03 -0800
commita74295a1ea686611498a75dd45597d224ce99287 (patch)
treea472e4d523d6e7aa72f4db62ca3b578fc4728ff5 /src/node.c
parent4296462bfe31c877f4826f5734813c88c7240770 (diff)
Rename 'header' -> 'heading'.
See jgm/CommonMark commit 0cdbcee4e840abd0ac7db93797b2b75ca4104314 Note that we have defined cmark_node_get_header_level = cmark_node_get_heading_level and cmark_node_set_header_level = camrk_node_set_heading_level for backwards compatibility in the API.
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/node.c b/src/node.c
index 8b358ce..ea0913b 100644
--- a/src/node.c
+++ b/src/node.c
@@ -74,7 +74,7 @@ cmark_node *cmark_node_new(cmark_node_type type) {
switch (node->type) {
case CMARK_NODE_HEADER:
- node->as.header.level = 1;
+ node->as.heading.level = 1;
break;
case CMARK_NODE_LIST: {
@@ -173,7 +173,7 @@ const char *cmark_node_get_type_string(cmark_node *node) {
case CMARK_NODE_PARAGRAPH:
return "paragraph";
case CMARK_NODE_HEADER:
- return "header";
+ return "heading";
case CMARK_NODE_HRULE:
return "hrule";
case CMARK_NODE_TEXT:
@@ -303,14 +303,14 @@ int cmark_node_set_literal(cmark_node *node, const char *content) {
return 0;
}
-int cmark_node_get_header_level(cmark_node *node) {
+int cmark_node_get_heading_level(cmark_node *node) {
if (node == NULL) {
return 0;
}
switch (node->type) {
case CMARK_NODE_HEADER:
- return node->as.header.level;
+ return node->as.heading.level;
default:
break;
@@ -319,14 +319,14 @@ int cmark_node_get_header_level(cmark_node *node) {
return 0;
}
-int cmark_node_set_header_level(cmark_node *node, int level) {
+int cmark_node_set_heading_level(cmark_node *node, int level) {
if (node == NULL || level < 1 || level > 6) {
return 0;
}
switch (node->type) {
case CMARK_NODE_HEADER:
- node->as.header.level = level;
+ node->as.heading.level = level;
return 1;
default: