fix(styling): Properly colorize yaml KVs with '/'

mine
Michael Cristina 2019-07-09 13:41:56 -05:00
parent 51ba2af98c
commit c15db446b0
2 changed files with 6 additions and 2 deletions

View File

@ -9,8 +9,8 @@ import (
)
var (
keyValRX = regexp.MustCompile(`\A(\s*)([\w|\-|\.|\s]+):\s(.+)\z`)
keyRX = regexp.MustCompile(`\A(\s*)([\w|\-|\.|\s]+):\s*\z`)
keyValRX = regexp.MustCompile(`\A(\s*)([\w|\-|\.|\/|\s]+):\s(.+)\z`)
keyRX = regexp.MustCompile(`\A(\s*)([\w|\-|\.|\/|\s]+):\s*\z`)
)
const (

View File

@ -39,6 +39,10 @@ func TestYaml(t *testing.T) {
"fred.blee: <none>",
"[steelblue::b]fred.blee[white::-]: [papayawhip::] <none>",
},
{
"certmanager.k8s.io/cluster-issuer: nameOfClusterIssuer",
"[steelblue::b]certmanager.k8s.io/cluster-issuer[white::-]: [papayawhip::]nameOfClusterIssuer",
},
}
s, _ := config.NewStyles("skins/stock.yml")