format: prettify entire project
This commit is contained in:
4
node_modules/css-tree/cjs/syntax/function/expression.cjs
generated
vendored
4
node_modules/css-tree/cjs/syntax/function/expression.cjs
generated
vendored
@ -3,9 +3,7 @@
|
||||
// legacy IE function
|
||||
// expression( <any-value> )
|
||||
function expressionFn() {
|
||||
return this.createSingleNodeList(
|
||||
this.Raw(this.tokenIndex, null, false)
|
||||
);
|
||||
return this.createSingleNodeList(this.Raw(this.tokenIndex, null, false));
|
||||
}
|
||||
|
||||
module.exports = expressionFn;
|
||||
|
55
node_modules/css-tree/cjs/syntax/function/var.cjs
generated
vendored
55
node_modules/css-tree/cjs/syntax/function/var.cjs
generated
vendored
@ -4,40 +4,45 @@ const types = require('../../tokenizer/types.cjs');
|
||||
|
||||
// var( <ident> , <value>? )
|
||||
function varFn() {
|
||||
const children = this.createList();
|
||||
const children = this.createList();
|
||||
|
||||
this.skipSC();
|
||||
this.skipSC();
|
||||
|
||||
// NOTE: Don't check more than a first argument is an ident, rest checks are for lexer
|
||||
children.push(this.Identifier());
|
||||
// NOTE: Don't check more than a first argument is an ident, rest checks are for lexer
|
||||
children.push(this.Identifier());
|
||||
|
||||
this.skipSC();
|
||||
this.skipSC();
|
||||
|
||||
if (this.tokenType === types.Comma) {
|
||||
children.push(this.Operator());
|
||||
if (this.tokenType === types.Comma) {
|
||||
children.push(this.Operator());
|
||||
|
||||
const startIndex = this.tokenIndex;
|
||||
const value = this.parseCustomProperty
|
||||
? this.Value(null)
|
||||
: this.Raw(this.tokenIndex, this.consumeUntilExclamationMarkOrSemicolon, false);
|
||||
const startIndex = this.tokenIndex;
|
||||
const value =
|
||||
this.parseCustomProperty ?
|
||||
this.Value(null)
|
||||
: this.Raw(
|
||||
this.tokenIndex,
|
||||
this.consumeUntilExclamationMarkOrSemicolon,
|
||||
false
|
||||
);
|
||||
|
||||
if (value.type === 'Value' && value.children.isEmpty) {
|
||||
for (let offset = startIndex - this.tokenIndex; offset <= 0; offset++) {
|
||||
if (this.lookupType(offset) === types.WhiteSpace) {
|
||||
value.children.appendData({
|
||||
type: 'WhiteSpace',
|
||||
loc: null,
|
||||
value: ' '
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (value.type === 'Value' && value.children.isEmpty) {
|
||||
for (let offset = startIndex - this.tokenIndex; offset <= 0; offset++) {
|
||||
if (this.lookupType(offset) === types.WhiteSpace) {
|
||||
value.children.appendData({
|
||||
type: 'WhiteSpace',
|
||||
loc: null,
|
||||
value: ' ',
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
children.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
return children;
|
||||
children.push(value);
|
||||
}
|
||||
|
||||
return children;
|
||||
}
|
||||
|
||||
module.exports = varFn;
|
||||
|
Reference in New Issue
Block a user