MCPcopy Create free account
hub / github.com/commonmark/cmark / cmark_node_set_literal

Function cmark_node_set_literal

src/node.c:323–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323int 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
344int cmark_node_get_heading_level(cmark_node *node) {
345 if (node == NULL) {

Callers 5

accessorsFunction · 0.85
create_treeFunction · 0.85
custom_nodesFunction · 0.85
render_commonmarkFunction · 0.85
process_emphasisFunction · 0.85

Calls 1

cmark_set_cstrFunction · 0.85

Tested by

no test coverage detected