mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-02 15:07:28 -04:00
Decode style JSON into a typed struct
This commit is contained in:
+4
-2
@@ -77,6 +77,8 @@ func (s BlockStack) Current() BlockElement {
|
||||
return s[len(s)-1]
|
||||
}
|
||||
|
||||
func (s BlockStack) With(child ElementStyle) ElementStyle {
|
||||
return cascadeStyle(s.Current().Style, child, true)
|
||||
func (s BlockStack) With(child StylePrimitive) StylePrimitive {
|
||||
sb := StyleBlock{}
|
||||
sb.StylePrimitive = child
|
||||
return cascadeStyle(s.Current().Style, sb, true).StylePrimitive
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user