Make auto-invert work with prefixed icons
This commit is contained in:
parent
808f3c1436
commit
88d8fa56fb
1 changed files with 5 additions and 5 deletions
|
|
@ -141,13 +141,13 @@ func newCustomIconField(value string) customIconField {
|
||||||
const autoInvertPrefix = "auto-invert "
|
const autoInvertPrefix = "auto-invert "
|
||||||
field := customIconField{}
|
field := customIconField{}
|
||||||
|
|
||||||
prefix, icon, found := strings.Cut(value, ":")
|
|
||||||
if !found {
|
|
||||||
if strings.HasPrefix(value, autoInvertPrefix) {
|
if strings.HasPrefix(value, autoInvertPrefix) {
|
||||||
field.IsFlatIcon = true
|
field.IsFlatIcon = true
|
||||||
value = strings.TrimPrefix(value, autoInvertPrefix)
|
value = strings.TrimPrefix(value, autoInvertPrefix)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prefix, icon, found := strings.Cut(value, ":")
|
||||||
|
if !found {
|
||||||
field.URL = template.URL(value)
|
field.URL = template.URL(value)
|
||||||
return field
|
return field
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue