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

Function cmark_node_get_url

src/node.c:510–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510const char *cmark_node_get_url(cmark_node *node) {
511 if (node == NULL) {
512 return NULL;
513 }
514
515 switch (node->type) {
516 case CMARK_NODE_LINK:
517 case CMARK_NODE_IMAGE:
518 return node->as.link.url ? (char *)node->as.link.url : "";
519 default:
520 break;
521 }
522
523 return NULL;
524}
525
526int cmark_node_set_url(cmark_node *node, const char *url) {
527 if (node == NULL) {

Callers 5

accessorsFunction · 0.85
S_render_nodeFunction · 0.85
S_render_nodeFunction · 0.85
get_link_typeFunction · 0.85
S_render_nodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected