diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2014-11-19 16:28:48 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2014-11-19 16:28:48 +0100 |
commit | b93d0b3a479bfc05dfbba0ad84172302df7f48cc (patch) | |
tree | 3f046a0094e953e2b86a4a563935797aa530b9c5 /src/node.c | |
parent | 18169a8174cd0c49d64d95a3b9509a66d359da27 (diff) |
Accessors for string content of code and HTML blocks
Diffstat (limited to 'src/node.c')
-rw-r--r-- | src/node.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -98,6 +98,11 @@ S_strdup(const char *str) { const char* cmark_node_get_string_content(cmark_node *node) { switch (node->type) { + case NODE_INDENTED_CODE: + case NODE_FENCED_CODE: + case NODE_HTML: + return cmark_strbuf_cstr(&node->string_content); + case NODE_STRING: case NODE_INLINE_HTML: case NODE_INLINE_CODE: @@ -112,6 +117,11 @@ cmark_node_get_string_content(cmark_node *node) { int cmark_node_set_string_content(cmark_node *node, const char *content) { switch (node->type) { + case NODE_INDENTED_CODE: + case NODE_FENCED_CODE: + case NODE_HTML: + cmark_strbuf_sets(&node->string_content, content); + case NODE_STRING: case NODE_INLINE_HTML: case NODE_INLINE_CODE: |