| 321 | } |
| 322 | |
| 323 | int cmark_node_set_literal(cmark_node *node, const char *content) { |
| 324 | if (node == NULL) { |
| 325 | return 0; |
| 326 | } |
| 327 | |
| 328 | switch (node->type) { |
| 329 | case CMARK_NODE_HTML_BLOCK: |
| 330 | case CMARK_NODE_TEXT: |
| 331 | case CMARK_NODE_HTML_INLINE: |
| 332 | case CMARK_NODE_CODE: |
| 333 | case CMARK_NODE_CODE_BLOCK: |
| 334 | node->len = cmark_set_cstr(node->mem, &node->data, content); |
| 335 | return 1; |
| 336 | |
| 337 | default: |
| 338 | break; |
| 339 | } |
| 340 | |
| 341 | return 0; |
| 342 | } |
| 343 | |
| 344 | int cmark_node_get_heading_level(cmark_node *node) { |
| 345 | if (node == NULL) { |
no test coverage detected