document: Better fix for #84
Made stricter: now it'll only reject the codefence if the delimiter that was used to start it is found three consecutive times.
This commit is contained in:
parent
c56d635afd
commit
f81eac9e1e
1 changed files with 2 additions and 2 deletions
|
@ -1362,8 +1362,8 @@ parse_codefence(uint8_t *data, size_t size, hoedown_buffer *lang, size_t *width,
|
|||
lang->size = i - lang_start;
|
||||
|
||||
/* Avoid parsing a codespan as a fence */
|
||||
i = w;
|
||||
while (i < size && data[i] != *chr) i++;
|
||||
i = lang_start + 2;
|
||||
while (i < size && !(data[i] == *chr && data[i-1] == *chr && data[i-2] == *chr)) i++;
|
||||
if (i < size) return 0;
|
||||
|
||||
return w;
|
||||
|
|
Loading…
Reference in a new issue