Should it be possible to call cmark_syntax_extension_set_special_inline_chars with characters that already have a special meaning MarkDown such as \?
If an extension calls this, it causes a problem in process_inlines() as it completely removes that character from the SPECIAL_CHARS table. When creating another parser without that extension enabled, this breaks subject_find_special_char. As a result \`code\` gets parsed as the string `code\ since \ is not understood as a special character anymore.
I think that it would be nice to either clarify in the API that cmark_syntax_extension_set_special_inline_chars is not supposed to be called like that or to change the logic invoked by process_inlines to not reset such special chars.
In any case, I am happy to work on a PR making these changes.
Should it be possible to call
cmark_syntax_extension_set_special_inline_charswith characters that already have a special meaning MarkDown such as\?If an extension calls this, it causes a problem in
process_inlines()as it completely removes that character from theSPECIAL_CHARStable. When creating another parser without that extension enabled, this breakssubject_find_special_char. As a result\`code\`gets parsed as the string`code\since\is not understood as a special character anymore.I think that it would be nice to either clarify in the API that
cmark_syntax_extension_set_special_inline_charsis not supposed to be called like that or to change the logic invoked byprocess_inlinesto not reset such special chars.In any case, I am happy to work on a PR making these changes.