markdown: let parse_fencedcode put text if there's no end fence
This commit is contained in:
parent
0c8ca0d568
commit
88711351ad
1 changed files with 4 additions and 6 deletions
|
@ -1688,18 +1688,16 @@ parse_fencedcode(hoedown_buffer *ob, hoedown_markdown *md, uint8_t *data, size_t
|
|||
// search for end
|
||||
i++;
|
||||
text_start = i;
|
||||
for (; i < size; i++) {
|
||||
line_start = i;
|
||||
for (; (line_start = i) < size; i++) {
|
||||
while (i < size && data[i] != '\n') i++;
|
||||
|
||||
w2 = is_codefence(data + line_start, i - line_start, &width2, &chr2);
|
||||
if (w == w2 && width == width2 && chr == chr2 &&
|
||||
is_empty(data + (line_start+w), i - (line_start+w))) {
|
||||
text.data = data + text_start;
|
||||
text.size = line_start - text_start;
|
||||
is_empty(data + (line_start+w), i - (line_start+w)))
|
||||
break;
|
||||
}
|
||||
}
|
||||
text.data = data + text_start;
|
||||
text.size = line_start - text_start;
|
||||
|
||||
// call callback
|
||||
if (md->md.blockcode)
|
||||
|
|
Loading…
Reference in a new issue