mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 08:27:18 -04:00
Use renderText even without an active style
This commit is contained in:
+6
-9
@@ -68,17 +68,14 @@ func (e *BaseElement) Render(w io.Writer, node *bf.Node, tr *TermRenderer) error
|
||||
renderText(w, tr.blockStyle.Current(), e.Suffix)
|
||||
}()
|
||||
|
||||
rules := cascadeStyles(tr.blockStyle, tr.style[e.Style])
|
||||
if rules == nil {
|
||||
_, _ = w.Write([]byte(e.Token))
|
||||
return nil
|
||||
rules := tr.blockStyle.With(tr.style[e.Style])
|
||||
if rules != nil {
|
||||
renderText(w, rules, rules.Prefix)
|
||||
defer func() {
|
||||
renderText(w, rules, rules.Suffix)
|
||||
}()
|
||||
}
|
||||
|
||||
renderText(w, rules, rules.Prefix)
|
||||
defer func() {
|
||||
renderText(w, rules, rules.Suffix)
|
||||
}()
|
||||
|
||||
renderText(w, rules, e.Token)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user