Warn against missing argument in linter

This commit is contained in:
Raymond Hill 2023-04-28 07:59:50 -04:00
parent 6c29ae82f2
commit ca2b016ee9
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -3686,11 +3686,12 @@ class ExtSelectorCompiler {
return { attr, value };
}
// When dealing with literal text, we must first eat _some_
// backslash characters.
// Remove potentially present quotes before processing.
compileText(s) {
if ( s === '' ) { return; }
if ( s === '' ) {
this.error = 'argument missing';
return;
}
const r = this.unquoteString(s);
if ( r.i !== s.length ) { return; }
return r.s;