fix(hcl): only highlight keywords when they're actually keywords

This commit is contained in:
Gareth Jones 2021-03-18 11:36:39 +13:00 committed by GitHub
parent 1aa64a86cf
commit 4b0dc65aaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,9 +17,9 @@ color green ":[[:space:]]*\"#[0-9abcdefABCDEF]+\""
# Escapes. # Escapes.
color green "\\\\" "\\\"" "\\[bfnrt]" "\\u[0-9abcdefABCDEF]{4})" color green "\\\\" "\\\"" "\\[bfnrt]" "\\u[0-9abcdefABCDEF]{4})"
# Special words. # Special words.
color green "(true|false|null|output|path|vault|description|default|value)" color green "\<(true|false|null|output|path|vault|description|default|value)\>"
color brightgreen "(variable|terraform|resource|provider|module)" color brightgreen "\<(variable|terraform|resource|provider|module)\>"
# Names (very unlikely to contain a quote). # Names (very unlikely to contain a quote).
color brightblue "\"[^"]+\"[[:space:]]*:" color brightblue "\"[^"]+\"[[:space:]]*:"