Make `CMARK_OPT_UNSAFE` settable during runtime
Closed this issue · 4 comments
Hi. I'm linking against library and would like to be able to set CMARK_OPT_UNSAFE
via method options,
Currently it's respected only during compile time and in cli binary.
Thanks!
Currently it's respected only during compile time and in cli binary, which.
This isn't true. CMARK_OPT_UNSAFE can be passed to several API functions at runtime.
@nwellnhof No doubt about that but is there any way oen can pass it to the ... cmark_markdown_to_html(...)
call? Thanks.
Here's the declaration of cmark_markdown_to_html
:
char *cmark_markdown_to_html(const char *text, size_t len, int options);
Just pass CMARK_OPT_UNSAFE
, maybe ORed with other flags, as options
argument.
@nwellnhof Sorry, didn't notice the definitions. They are buried below, which is kinda surprising:
Lines 545 to 571 in 7195c67
Thanks!