|
|
@ -59,51 +59,50 @@ func expandThemeAliases(rules []style.Rule) []style.Rule {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var attrsMapping = map[style.Rule]color.Attribute{
|
|
|
|
var attrsMapping = map[style.Rule]color.Attribute{
|
|
|
|
"reset": color.Reset,
|
|
|
|
style.RuleBold: color.Bold,
|
|
|
|
"bold": color.Bold,
|
|
|
|
style.RuleFaint: color.Faint,
|
|
|
|
"faint": color.Faint,
|
|
|
|
style.RuleItalic: color.Italic,
|
|
|
|
"italic": color.Italic,
|
|
|
|
style.RuleUnderline: color.Underline,
|
|
|
|
"underline": color.Underline,
|
|
|
|
style.RuleBlink: color.BlinkSlow,
|
|
|
|
"blink-slow": color.BlinkSlow,
|
|
|
|
style.RuleReverse: color.ReverseVideo,
|
|
|
|
"blink-fast": color.BlinkRapid,
|
|
|
|
style.RuleHidden: color.Concealed,
|
|
|
|
"hidden": color.Concealed,
|
|
|
|
style.RuleStrikethrough: color.CrossedOut,
|
|
|
|
"strikethrough": color.CrossedOut,
|
|
|
|
|
|
|
|
|
|
|
|
style.RuleBlack: color.FgBlack,
|
|
|
|
"black": color.FgBlack,
|
|
|
|
style.RuleRed: color.FgRed,
|
|
|
|
"red": color.FgRed,
|
|
|
|
style.RuleGreen: color.FgGreen,
|
|
|
|
"green": color.FgGreen,
|
|
|
|
style.RuleYellow: color.FgYellow,
|
|
|
|
"yellow": color.FgYellow,
|
|
|
|
style.RuleBlue: color.FgBlue,
|
|
|
|
"blue": color.FgBlue,
|
|
|
|
style.RuleMagenta: color.FgMagenta,
|
|
|
|
"magenta": color.FgMagenta,
|
|
|
|
style.RuleCyan: color.FgCyan,
|
|
|
|
"cyan": color.FgCyan,
|
|
|
|
style.RuleWhite: color.FgWhite,
|
|
|
|
"white": color.FgWhite,
|
|
|
|
|
|
|
|
|
|
|
|
style.RuleBlackBg: color.BgBlack,
|
|
|
|
"black-bg": color.BgBlack,
|
|
|
|
style.RuleRedBg: color.BgRed,
|
|
|
|
"red-bg": color.BgRed,
|
|
|
|
style.RuleGreenBg: color.BgGreen,
|
|
|
|
"green-bg": color.BgGreen,
|
|
|
|
style.RuleYellowBg: color.BgYellow,
|
|
|
|
"yellow-bg": color.BgYellow,
|
|
|
|
style.RuleBlueBg: color.BgBlue,
|
|
|
|
"blue-bg": color.BgBlue,
|
|
|
|
style.RuleMagentaBg: color.BgMagenta,
|
|
|
|
"magenta-bg": color.BgMagenta,
|
|
|
|
style.RuleCyanBg: color.BgCyan,
|
|
|
|
"cyan-bg": color.BgCyan,
|
|
|
|
style.RuleWhiteBg: color.BgWhite,
|
|
|
|
"white-bg": color.BgWhite,
|
|
|
|
|
|
|
|
|
|
|
|
style.RuleBrightBlack: color.FgHiBlack,
|
|
|
|
"bright-black": color.FgHiBlack,
|
|
|
|
style.RuleBrightRed: color.FgHiRed,
|
|
|
|
"bright-red": color.FgHiRed,
|
|
|
|
style.RuleBrightGreen: color.FgHiGreen,
|
|
|
|
"bright-green": color.FgHiGreen,
|
|
|
|
style.RuleBrightYellow: color.FgHiYellow,
|
|
|
|
"bright-yellow": color.FgHiYellow,
|
|
|
|
style.RuleBrightBlue: color.FgHiBlue,
|
|
|
|
"bright-blue": color.FgHiBlue,
|
|
|
|
style.RuleBrightMagenta: color.FgHiMagenta,
|
|
|
|
"bright-magenta": color.FgHiMagenta,
|
|
|
|
style.RuleBrightCyan: color.FgHiCyan,
|
|
|
|
"bright-cyan": color.FgHiCyan,
|
|
|
|
style.RuleBrightWhite: color.FgHiWhite,
|
|
|
|
"bright-white": color.FgHiWhite,
|
|
|
|
|
|
|
|
|
|
|
|
style.RuleBrightBlackBg: color.BgHiBlack,
|
|
|
|
"bright-black-bg": color.BgHiBlack,
|
|
|
|
style.RuleBrightRedBg: color.BgHiRed,
|
|
|
|
"bright-red-bg": color.BgHiRed,
|
|
|
|
style.RuleBrightGreenBg: color.BgHiGreen,
|
|
|
|
"bright-green-bg": color.BgHiGreen,
|
|
|
|
style.RuleBrightYellowBg: color.BgHiYellow,
|
|
|
|
"bright-yellow-bg": color.BgHiYellow,
|
|
|
|
style.RuleBrightBlueBg: color.BgHiBlue,
|
|
|
|
"bright-blue-bg": color.BgHiBlue,
|
|
|
|
style.RuleBrightMagentaBg: color.BgHiMagenta,
|
|
|
|
"bright-magenta-bg": color.BgHiMagenta,
|
|
|
|
style.RuleBrightCyanBg: color.BgHiCyan,
|
|
|
|
"bright-cyan-bg": color.BgHiCyan,
|
|
|
|
style.RuleBrightWhiteBg: color.BgHiWhite,
|
|
|
|
"bright-white-bg": color.BgHiWhite,
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *Styler) attributes(rules []style.Rule) ([]color.Attribute, error) {
|
|
|
|
func (s *Styler) attributes(rules []style.Rule) ([]color.Attribute, error) {
|
|
|
|