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

Function S_render_sourcepos

src/html.c:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33static void S_render_sourcepos(cmark_node *node, cmark_strbuf *html,
34 int options) {
35 char buffer[BUFFER_SIZE];
36 if (CMARK_OPT_SOURCEPOS & options) {
37 snprintf(buffer, BUFFER_SIZE, " data-sourcepos=\"%d:%d-%d:%d\"",
38 cmark_node_get_start_line(node), cmark_node_get_start_column(node),
39 cmark_node_get_end_line(node), cmark_node_get_end_column(node));
40 cmark_strbuf_puts(html, buffer);
41 }
42}
43
44static int S_render_node(cmark_node *node, cmark_event_type ev_type,
45 struct render_state *state, int options) {

Callers 1

S_render_nodeFunction · 0.85

Calls 5

cmark_node_get_end_lineFunction · 0.85
cmark_strbuf_putsFunction · 0.85

Tested by

no test coverage detected