recognize USO vars ending with -rgb
This commit is contained in:
parent
aa44077212
commit
8f9705c165
|
@ -193,7 +193,8 @@ CodeMirror.hint && (() => {
|
||||||
string[pos - 3] === ']' &&
|
string[pos - 3] === ']' &&
|
||||||
string[pos - 4] === ']') {
|
string[pos - 4] === ']') {
|
||||||
const vars = typeof editor !== 'undefined' && (editor.getStyle().usercssData || {}).vars;
|
const vars = typeof editor !== 'undefined' && (editor.getStyle().usercssData || {}).vars;
|
||||||
if (vars && Object.hasOwnProperty.call(vars, string.slice(start + 4, pos - 4))) {
|
const name = vars && string.slice(start + 4, pos - 4);
|
||||||
|
if (vars && Object.hasOwnProperty.call(vars, name.endsWith('-rgb') ? name.slice(0, -4) : name)) {
|
||||||
token[0] = USO_VALID_VAR;
|
token[0] = USO_VALID_VAR;
|
||||||
} else {
|
} else {
|
||||||
token[0] = USO_INVALID_VAR;
|
token[0] = USO_INVALID_VAR;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user