diff --git a/ansi/renderer.go b/ansi/renderer.go index c14217c..5f39819 100644 --- a/ansi/renderer.go +++ b/ansi/renderer.go @@ -129,10 +129,14 @@ func (r *ANSIRenderer) renderNode(w util.BufWriter, source []byte, node ast.Node } func isChild(node ast.Node) bool { + if node.Parent() != nil && node.Parent().Kind() == ast.KindBlockquote { + // skip paragraph within blockquote to avoid reflowing text + return true + } for n := node.Parent(); n != nil; n = n.Parent() { // These types are already rendered by their parent switch n.Kind() { - case ast.KindLink, ast.KindImage, ast.KindEmphasis, astext.KindStrikethrough, ast.KindBlockquote, astext.KindTableCell: + case ast.KindLink, ast.KindImage, ast.KindEmphasis, astext.KindStrikethrough, astext.KindTableCell: return true } }