mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-08-29 13:16:39 -04:00
Inherit prefix and suffix from parent style on demand
This commit is contained in:
@@ -90,6 +90,8 @@ func cascadeStyle(parent ElementStyle, child ElementStyle, onlyColors bool) Elem
|
||||
s.Overlined = parent.Overlined
|
||||
s.Inverse = parent.Inverse
|
||||
s.Blink = parent.Blink
|
||||
s.Prefix = parent.Prefix
|
||||
s.Suffix = parent.Suffix
|
||||
}
|
||||
|
||||
if child.Color != nil {
|
||||
@@ -131,6 +133,12 @@ func cascadeStyle(parent ElementStyle, child ElementStyle, onlyColors bool) Elem
|
||||
if child.Blink != nil {
|
||||
s.Blink = child.Blink
|
||||
}
|
||||
if child.Prefix != "" {
|
||||
s.Prefix = child.Prefix
|
||||
}
|
||||
if child.Suffix != "" {
|
||||
s.Suffix = child.Suffix
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user