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

Function cmark_node_set_on_enter

src/node.c:592–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592int cmark_node_set_on_enter(cmark_node *node, const char *on_enter) {
593 if (node == NULL) {
594 return 0;
595 }
596
597 switch (node->type) {
598 case CMARK_NODE_CUSTOM_INLINE:
599 case CMARK_NODE_CUSTOM_BLOCK:
600 cmark_set_cstr(node->mem, &node->as.custom.on_enter, on_enter);
601 return 1;
602 default:
603 break;
604 }
605
606 return 0;
607}
608
609const char *cmark_node_get_on_exit(cmark_node *node) {
610 if (node == NULL) {

Callers 1

custom_nodesFunction · 0.85

Calls 1

cmark_set_cstrFunction · 0.85

Tested by

no test coverage detected