mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 00:47:15 -04:00
Implement Capitalization (#118)
This commit is contained in:
@@ -45,6 +45,9 @@ type StylePrimitive struct {
|
||||
BackgroundColor *string `json:"background_color,omitempty"`
|
||||
Underline *bool `json:"underline,omitempty"`
|
||||
Bold *bool `json:"bold,omitempty"`
|
||||
Upper *bool `json:"upper,omitempty"`
|
||||
Lower *bool `json:"lower,omitempty"`
|
||||
Title *bool `json:"title,omitempty"`
|
||||
Italic *bool `json:"italic,omitempty"`
|
||||
CrossedOut *bool `json:"crossed_out,omitempty"`
|
||||
Faint *bool `json:"faint,omitempty"`
|
||||
@@ -151,6 +154,9 @@ func cascadeStyle(parent StyleBlock, child StyleBlock, toBlock bool) StyleBlock
|
||||
s.BackgroundColor = parent.BackgroundColor
|
||||
s.Underline = parent.Underline
|
||||
s.Bold = parent.Bold
|
||||
s.Upper = parent.Upper
|
||||
s.Title = parent.Title
|
||||
s.Lower = parent.Lower
|
||||
s.Italic = parent.Italic
|
||||
s.CrossedOut = parent.CrossedOut
|
||||
s.Faint = parent.Faint
|
||||
@@ -186,6 +192,15 @@ func cascadeStyle(parent StyleBlock, child StyleBlock, toBlock bool) StyleBlock
|
||||
if child.Bold != nil {
|
||||
s.Bold = child.Bold
|
||||
}
|
||||
if child.Upper != nil {
|
||||
s.Upper = child.Upper
|
||||
}
|
||||
if child.Lower != nil {
|
||||
s.Lower = child.Lower
|
||||
}
|
||||
if child.Title != nil {
|
||||
s.Title = child.Title
|
||||
}
|
||||
if child.Italic != nil {
|
||||
s.Italic = child.Italic
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user