vscode-apache
vscode-apache copied to clipboard
User keyword is colored when it should not
Description
The User keyword is being colored when it should not.
Reproduce the issue
In a .htaccess file, paste this code:
# Blocked user agents
SetEnvIfNoCase ^User-Agent$ .*(googlebot|yandex) HTTP_SAFE_BADBOT
Deny from env=HTTP_SAFE_BADBOT
The word User in ^User-Agent$ is being colored, but it should not because it is part of the regular expression.
Expected result
The User keyword should not be colored in a regular expression.
Notes
I might have found the rule that control the User coloration here:
https://github.com/mrmlnc/vscode-apache/blob/master/syntaxes/Apache.tmLanguage#L209
Just add ^[\t\s]* (matches tab and white space at the start of a line) after the <string> in the line you've linked.
Like this:
<string>^[\t\s]*\b(AcceptMutex|AssignUserID|BS2000Accou(...)