summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commonmark.c1
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])));
}