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

Function cmark_node_is_leaf

src/node.c:25–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25bool cmark_node_is_leaf(cmark_node *node) {
26 if (node == NULL) {
27 return false;
28 }
29 switch (node->type) {
30 case CMARK_NODE_THEMATIC_BREAK: return true;
31 case CMARK_NODE_CODE_BLOCK : return true;
32 case CMARK_NODE_TEXT : return true;
33 case CMARK_NODE_SOFTBREAK : return true;
34 case CMARK_NODE_LINEBREAK : return true;
35 case CMARK_NODE_CODE : return true;
36 case CMARK_NODE_HTML_INLINE: return true;
37 }
38 return false;
39}
40
41static bool S_can_contain(cmark_node *node, cmark_node *child) {
42 if (node == NULL || child == NULL || node == child) {

Callers 1

classifiersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected