diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-03-28 23:10:28 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-03-28 23:10:28 -0700 |
commit | dfe48b48179c7779b39da9ba868fa182f8368e38 (patch) | |
tree | bdae491e142f876319c1b29513771c09ea79e48d /src/commonmark.c | |
parent | ea888d7291523b8e207ab32b66374fa043384e65 (diff) |
commonmark renderer: better escaping of `#`.
Diffstat (limited to 'src/commonmark.c')
-rw-r--r-- | src/commonmark.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/commonmark.c b/src/commonmark.c index 9606fbe..6347bb5 100644 --- a/src/commonmark.c +++ b/src/commonmark.c @@ -48,6 +48,7 @@ needs_escaping(int32_t c, unsigned char next_c, struct render_state *state) (c == '!' && next_c == '[') || (state->begin_line && (c == '-' || c == '+' || c == '#' || c == '=')) || + (c == '#' && (isspace(next_c) || next_c == '\0')) || ((c == '.' || c == ')') && isdigit(state->buffer->ptr[state->buffer->size - 1]))); } |