mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 16:37:19 -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.Overlined = parent.Overlined
|
||||||
s.Inverse = parent.Inverse
|
s.Inverse = parent.Inverse
|
||||||
s.Blink = parent.Blink
|
s.Blink = parent.Blink
|
||||||
|
s.Prefix = parent.Prefix
|
||||||
|
s.Suffix = parent.Suffix
|
||||||
}
|
}
|
||||||
|
|
||||||
if child.Color != nil {
|
if child.Color != nil {
|
||||||
@@ -131,6 +133,12 @@ func cascadeStyle(parent ElementStyle, child ElementStyle, onlyColors bool) Elem
|
|||||||
if child.Blink != nil {
|
if child.Blink != nil {
|
||||||
s.Blink = child.Blink
|
s.Blink = child.Blink
|
||||||
}
|
}
|
||||||
|
if child.Prefix != "" {
|
||||||
|
s.Prefix = child.Prefix
|
||||||
|
}
|
||||||
|
if child.Suffix != "" {
|
||||||
|
s.Suffix = child.Suffix
|
||||||
|
}
|
||||||
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user