You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nodes of this type return "<unknown>" when passed to cmark_node_get_type_string is it intentional that there's no entry for these types in that function?
Basic program to show the "<unknown>"s:
#include<stdio.h>#include<string.h>#include"cmark-gfm.h"intmain(void)
{
constchar*document="Here's a footnote[^1]\n\n[^1]: a reference\n";
cmark_node*root=cmark_parse_document(document, strlen(document), CMARK_OPT_DEFAULT | CMARK_OPT_FOOTNOTES);
cmark_iter*iter=cmark_iter_new(root);
for (cmark_event_typeev_type=cmark_iter_next(iter); ev_type!=CMARK_EVENT_DONE; ev_type=cmark_iter_next(iter)) {
if (ev_type==CMARK_EVENT_ENTER) {
cmark_node*cur=cmark_iter_get_node(iter);
printf("%s\n", cmark_node_get_type_string(cur));
}
}
cmark_iter_free(iter);
cmark_node_free(root);
return0;
}
Output:
document
paragraph
text
<unknown>
<unknown>
paragraph
text
The text was updated successfully, but these errors were encountered:
Nodes of this type return
"<unknown>"
when passed tocmark_node_get_type_string
is it intentional that there's no entry for these types in that function?Basic program to show the
"<unknown>"
s:Output:
The text was updated successfully, but these errors were encountered: