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

Function cmark_node_get_heading_level

src/node.c:344–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344int cmark_node_get_heading_level(cmark_node *node) {
345 if (node == NULL) {
346 return 0;
347 }
348
349 switch (node->type) {
350 case CMARK_NODE_HEADING:
351 return node->as.heading.level;
352
353 default:
354 break;
355 }
356
357 return 0;
358}
359
360int cmark_node_set_heading_level(cmark_node *node, int level) {
361 if (node == NULL || level < 1 || level > 6) {

Callers 5

constructorFunction · 0.85
accessorsFunction · 0.85
S_render_nodeFunction · 0.85
S_render_nodeFunction · 0.85
S_render_nodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected