Merge pull request #257 from mcristina422/kvStyling

fix(styling): Properly colorize yaml KVs with '/'
mine
Fernand Galiana 2019-07-09 22:38:41 -06:00 committed by GitHub
commit a33add80bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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")