mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1889871 - [devtools] Use InspectorCSSParser in advanceValidate. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D206751
This commit is contained in:
parent
e7b5a4bb05
commit
ca44c8af31
@ -51,11 +51,11 @@ function advanceValidate(keyCode, value, insertionPoint) {
|
||||
// value. Otherwise it's been inserted in some spot where it has a
|
||||
// valid meaning, like a comment or string.
|
||||
value = value.slice(0, insertionPoint) + ";" + value.slice(insertionPoint);
|
||||
const lexer = getCSSLexer(value);
|
||||
const lexer = getCSSLexer(value, true);
|
||||
while (true) {
|
||||
const token = lexer.nextToken();
|
||||
if (token.endOffset > insertionPoint) {
|
||||
if (token.tokenType === "symbol" && token.text === ";") {
|
||||
if (token.tokenType === "Semicolon") {
|
||||
// The ";" is a terminator.
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user