Closed DenisDuev closed 2 years ago
looks like the paragraph code doesn't check for blockquotes, this patch fixes that and doesn't break any current tests:
diff --git parser/block.go parser/block.go
index eeebec7..7c2401f 100644
--- parser/block.go
+++ parser/block.go
@@ -1675,6 +1675,12 @@ func (p *Parser) paragraph(data []byte) int {
return i
}
+ // if there's a block quote, paragraph is over
+ if p.quotePrefix(current) > 0 {
+ p.renderParagraph(data[:i])
+ return i
+ }
+
// if there's a fenced code block, paragraph is over
if p.extensions&FencedCode != 0 {
if p.fencedCodeBlock(current, false) > 0 {
Thanks, applied.
Cheers. Note that there isn't a specific test for this.
On Tue, 7 Jun 2022, 18:33 Krzysztof Kowalczyk, @.***> wrote:
Thanks, applied.
— Reply to this email directly, view it on GitHub https://github.com/gomarkdown/markdown/issues/242#issuecomment-1148905098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACWIWZUI73PRS6HIE3IXJLVN52XBANCNFSM5X7PFBJA . You are receiving this because you commented.Message ID: @.***>
I've added a test as part of this change.
Only one newline breaks blockquote parsing:
Returns:
Expected result:
https://babelmark.github.io/?text=asd%0A%3E+blockquote+with+no+space