summaryrefslogtreecommitdiff
path: root/src/cmark.h
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/cmark.h
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/cmark.h')
-rw-r--r--src/cmark.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/cmark.h b/src/cmark.h
index ae00e86..ec36e02 100644
--- a/src/cmark.h
+++ b/src/cmark.h
@@ -141,7 +141,7 @@ CMARK_EXPORT cmark_node *cmark_node_last_child(cmark_node *node);
* One natural application is an HTML renderer, where an `ENTER` event
* outputs an open tag and an `EXIT` event outputs a close tag.
* An iterator might also be used to transform an AST in some systematic
- * way, for example, turning all level-3 headers into regular paragraphs.
+ * way, for example, turning all level-3 headings into regular paragraphs.
*
* void
* usage_example(cmark_node *root) {
@@ -245,13 +245,17 @@ CMARK_EXPORT const char *cmark_node_get_literal(cmark_node *node);
*/
CMARK_EXPORT int cmark_node_set_literal(cmark_node *node, const char *content);
-/** Returns the header level of 'node', or 0 if 'node' is not a header.
+/** Returns the heading level of 'node', or 0 if 'node' is not a heading.
*/
-CMARK_EXPORT int cmark_node_get_header_level(cmark_node *node);
+CMARK_EXPORT int cmark_node_get_heading_level(cmark_node *node);
-/** Sets the header level of 'node', returning 1 on success and 0 on error.
+/* For backwards compatibility */
+#define cmark_node_get_header_level cmark_node_get_heading_level
+#define cmark_node_set_header_level cmark_node_set_heading_level
+
+/** Sets the heading level of 'node', returning 1 on success and 0 on error.
*/
-CMARK_EXPORT int cmark_node_set_header_level(cmark_node *node, int level);
+CMARK_EXPORT int cmark_node_set_heading_level(cmark_node *node, int level);
/** Returns the list type of 'node', or `CMARK_NO_LIST` if 'node'
* is not a list.