diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-07-12 20:17:12 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-07-12 20:17:12 -0700 |
commit | 34cd161d7b70c39957f46c9602aef165d747a466 (patch) | |
tree | aa30503728d166ec1daf04df3db87978ab9f4ea0 /src | |
parent | adfae46c7144eb65532e10961420f2ef58cac4ed (diff) |
commonmark writer - escape all #'s, not just at beginning of line.
This is needed for #s at the end of atx headers.
Diffstat (limited to 'src')
-rw-r--r-- | src/commonmark.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commonmark.c b/src/commonmark.c index 088b934..5d5cd8a 100644 --- a/src/commonmark.c +++ b/src/commonmark.c @@ -29,12 +29,12 @@ static inline void outc(cmark_renderer *renderer, needs_escaping = escape != LITERAL && ((escape == NORMAL && - (c == '*' || c == '_' || c == '[' || c == ']' || + (c == '*' || c == '_' || c == '[' || c == ']' || c == '#' || c == '<' || c == '>' || c == '\\' || c == '`' || (c == '&' && isalpha(nextc)) || (c == '!' && nextc == '[') || (renderer->begin_line && - (c == '-' || c == '+' || c == '#' || c == '=')) || + (c == '-' || c == '+' || c == '=')) || ((c == '.' || c == ')') && isdigit(renderer->buffer->ptr[renderer->buffer->size - 1])))) || (escape == URL && |