Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix blockquotes nested inside of paragraphs

  • Loading branch information...
commit 4c43f75a62a40afefa655f3f93ecc943a19528fe 1 parent 690ec87
Vicent Marti vmg authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/markdown.c
9 src/markdown.c
View
@@ -1420,7 +1420,10 @@ parse_paragraph(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t
while (i < size) {
for (end = i + 1; end < size && data[end - 1] != '\n'; end++) /* empty */;
- if (is_empty(data + i, size - i) || (level = is_headerline(data + i, size - i)) != 0)
+ if (is_empty(data + i, size - i))
+ break;
+
+ if ((level = is_headerline(data + i, size - i)) != 0)
break;
if (rndr->ext_flags & MKDEXT_LAX_HTML_BLOCKS) {
@@ -1430,7 +1433,9 @@ parse_paragraph(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t
}
}
- if (is_atxheader(rndr, data + i, size - i) || is_hrule(data + i, size - i)) {
+ if (is_atxheader(rndr, data + i, size - i) ||
+ is_hrule(data + i, size - i) ||
+ prefix_quote(data + i, size - i)) {
end = i;
break;
}
Please sign in to comment.
Something went wrong with that request. Please try again.