mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-03 15:37:17 -04:00
Render prefix/suffix in current style
This commit is contained in:
+2
-2
@@ -60,11 +60,11 @@ func renderText(w io.Writer, rules *ElementStyle, s string) {
|
||||
|
||||
func (e *BaseElement) Render(w io.Writer, node *bf.Node, tr *TermRenderer) error {
|
||||
if e.Prefix != "" {
|
||||
_, _ = w.Write([]byte(e.Prefix))
|
||||
renderText(w, tr.blockStyle.Current(), e.Prefix)
|
||||
}
|
||||
defer func() {
|
||||
if e.Suffix != "" {
|
||||
_, _ = w.Write([]byte(e.Suffix))
|
||||
renderText(w, tr.blockStyle.Current(), e.Suffix)
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user