commonmark writer: less aggressive escaping for !.

See #131.
This commit is contained in:
John MacFarlane 2023-02-08 09:48:51 -08:00
parent dfb1526b38
commit 7195c6735f

View File

@ -35,7 +35,8 @@ static CMARK_INLINE void outc(cmark_renderer *renderer, cmark_escaping escape,
((escape == NORMAL &&
(c < 0x20 ||
c == '*' || c == '_' || c == '[' || c == ']' || c == '#' || c == '<' ||
c == '>' || c == '\\' || c == '`' || c == '!' ||
c == '>' || c == '\\' || c == '`' ||
(c == '!' && (!nextc || nextc == '[')) ||
(c == '&' && cmark_isalpha(nextc)) || (c == '!' && nextc == '[') ||
((CMARK_OPT_SMART & options) &&
((c == '-' && nextc == '-') ||