vscode-apache icon indicating copy to clipboard operation
vscode-apache copied to clipboard

User keyword is colored when it should not

Open khalyomede opened this issue 6 years ago • 1 comments

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

khalyomede avatar Jan 04 '20 18:01 khalyomede

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(...)

dziku86 avatar Mar 11 '21 10:03 dziku86