mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-02 15:07:28 -04:00
Fix blockquote rendering
This commit is contained in:
+5
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user