summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-11-19 18:06:03 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2014-11-19 18:06:03 +0100
commitce4b717d6a05d707ea19eee68a74dd3621de3513 (patch)
treeeed03ccb00c37f79d942f8a16c2549098f0c0a19
parent7f8a0d96dd3ab34b4f8ec233fd243f53a01a4e6a (diff)
Fix {get|set}_string_content
-rw-r--r--src/node.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index 8b8b988..190deb9 100644
--- a/src/node.c
+++ b/src/node.c
@@ -107,6 +107,7 @@ cmark_node_get_string_content(cmark_node *node) {
case NODE_INLINE_HTML:
case NODE_INLINE_CODE:
return cmark_chunk_to_cstr(&node->as.literal);
+
default:
break;
}
@@ -121,12 +122,14 @@ cmark_node_set_string_content(cmark_node *node, const char *content) {
case NODE_FENCED_CODE:
case NODE_HTML:
cmark_strbuf_sets(&node->string_content, content);
+ return 1;
case NODE_STRING:
case NODE_INLINE_HTML:
case NODE_INLINE_CODE:
cmark_chunk_set_cstr(&node->as.literal, content);
return 1;
+
default:
break;
}