mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-02 05:41:10 -08:00
fix(image): add background reset sequence
This commit is contained in:
parent
c57975985f
commit
865374a0f5
|
@ -73,6 +73,7 @@ const (
|
|||
overlineReset = "overliner"
|
||||
strikethrough = "strikethrough"
|
||||
strikethroughReset = "strikethroughr"
|
||||
backgroundReset = "backgroundr"
|
||||
color16 = "color16"
|
||||
left = "left"
|
||||
lineChange = "linechange"
|
||||
|
@ -186,6 +187,7 @@ func (ir *ImageRenderer) Init(env platform.Environment) error {
|
|||
overlineReset: `^(?P<STR>\x1b\[55m)`,
|
||||
strikethrough: `^(?P<STR>\x1b\[9m)`,
|
||||
strikethroughReset: `^(?P<STR>\x1b\[29m)`,
|
||||
backgroundReset: `^(?P<STR>\x1b\[49m)`,
|
||||
color16: `^(?P<STR>\x1b\[(?P<BC>[349][0-7]|10[0-7]|39)m)`,
|
||||
left: `^(?P<STR>\x1b\[(\d{1,3})D)`,
|
||||
lineChange: `^(?P<STR>\x1b\[(\d)[FB])`,
|
||||
|
@ -566,6 +568,9 @@ func (ir *ImageRenderer) shouldPrint() bool {
|
|||
ir.foregroundColor = ir.defaultForegroundColor
|
||||
ir.backgroundColor = nil
|
||||
return false
|
||||
case backgroundReset:
|
||||
ir.backgroundColor = nil
|
||||
return false
|
||||
case bold, italic, underline, overline:
|
||||
ir.style = sequence
|
||||
return false
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
"leading_diamond": "<#00c7fc> \ue285 </><#ffafd2>{</>",
|
||||
"properties": {
|
||||
"folder_icon": "\uf07b",
|
||||
"folder_separator_icon": "\uebcb",
|
||||
"folder_separator_icon": " \uebcb ",
|
||||
"home_icon": "home",
|
||||
"style": "agnoster_full"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue