summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmark.h5
-rw-r--r--src/node.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/cmark.h b/src/cmark.h
index 2559b5f..f96cea9 100644
--- a/src/cmark.h
+++ b/src/cmark.h
@@ -34,6 +34,9 @@ char *cmark_markdown_to_html(const char *text, int len);
/**
*/
typedef enum {
+ /* Error status */
+ CMARK_NODE_NONE,
+
/* Block */
CMARK_NODE_DOCUMENT,
CMARK_NODE_BLOCK_QUOTE,
@@ -62,8 +65,6 @@ typedef enum {
CMARK_NODE_FIRST_INLINE = CMARK_NODE_TEXT,
CMARK_NODE_LAST_INLINE = CMARK_NODE_IMAGE,
-
- CMARK_NODE_NONE = -1
} cmark_node_type;
diff --git a/src/node.c b/src/node.c
index 0991a9d..9e83ed3 100644
--- a/src/node.c
+++ b/src/node.c
@@ -88,6 +88,7 @@ static const char*
S_type_string(cmark_node *node)
{
switch (node->type) {
+ case CMARK_NODE_NONE: return "NONE";
case CMARK_NODE_DOCUMENT: return "DOCUMENT";
case CMARK_NODE_BLOCK_QUOTE: return "BLOCK_QUOTE";
case CMARK_NODE_LIST: return "LIST";
@@ -107,7 +108,6 @@ S_type_string(cmark_node *node)
case CMARK_NODE_STRONG: return "STRONG";
case CMARK_NODE_LINK: return "LINK";
case CMARK_NODE_IMAGE: return "IMAGE";
- case CMARK_NODE_NONE: return "NONE";
}
return "<unknown>";