mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-08-29 21:26:44 -04:00
Render styled prefix & suffix for primitives
This commit is contained in:
@@ -145,11 +145,18 @@ func (e *BaseElement) Render(w io.Writer, ctx RenderContext) error {
|
||||
}()
|
||||
|
||||
rules := bs.With(e.Style)
|
||||
// render unstyled prefix/suffix
|
||||
renderText(w, bs.Current().Style.StylePrimitive, rules.Prefix)
|
||||
defer func() {
|
||||
renderText(w, bs.Current().Style.StylePrimitive, rules.Suffix)
|
||||
}()
|
||||
|
||||
// render styled prefix/suffix
|
||||
renderText(w, rules, rules.StyledPrefix)
|
||||
defer func() {
|
||||
renderText(w, rules, rules.StyledSuffix)
|
||||
}()
|
||||
|
||||
s := e.Token
|
||||
if len(rules.Format) > 0 {
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user