vscode-html-languageservice
Advanced tools
Comparing version 4.2.4 to 4.2.5
// copied from js-beautify/js/lib/beautify-css.js | ||
// version: 1.14.0 | ||
// version: 1.14.3 | ||
/* AUTO-GENERATED. DO NOT MODIFY. */ | ||
@@ -1005,4 +1005,4 @@ /* | ||
var Beautifier = __webpack_require__(16).Beautifier, | ||
Options = __webpack_require__(17).Options; | ||
var Beautifier = (__webpack_require__(16).Beautifier), | ||
Options = (__webpack_require__(17).Options); | ||
@@ -1054,6 +1054,6 @@ function css_beautify(source_text, options) { | ||
var Options = __webpack_require__(17).Options; | ||
var Output = __webpack_require__(2).Output; | ||
var InputScanner = __webpack_require__(8).InputScanner; | ||
var Directives = __webpack_require__(13).Directives; | ||
var Options = (__webpack_require__(17).Options); | ||
var Output = (__webpack_require__(2).Output); | ||
var InputScanner = (__webpack_require__(8).InputScanner); | ||
var Directives = (__webpack_require__(13).Directives); | ||
@@ -1094,2 +1094,5 @@ var directives_core = new Directives(/\/\*/, /\*\//); | ||
}; | ||
this.NON_SEMICOLON_NEWLINE_PROPERTY = [ | ||
"grid-template" | ||
]; | ||
@@ -1219,3 +1222,5 @@ } | ||
var insideAtImport = false; | ||
var insideScssMap = false; | ||
var topCharacter = this._ch; | ||
var insideNonSemiColonValues = false; | ||
var whitespace; | ||
@@ -1272,3 +1277,3 @@ var isAfterSpace; | ||
this.eatWhitespace(true); | ||
} else if (this._ch === '@') { | ||
} else if (this._ch === '@' || this._ch === '$') { | ||
this.preserveSingleSpace(isAfterSpace); | ||
@@ -1344,3 +1349,8 @@ | ||
} else { | ||
this.indent(); | ||
// inside mixin and first param is object | ||
if (previous_ch === '(') { | ||
this._output.space_before_token = false; | ||
} else if (previous_ch !== ',') { | ||
this.indent(); | ||
} | ||
this.print_string(this._ch); | ||
@@ -1377,3 +1387,17 @@ } | ||
} | ||
if (this._input.peek() === ')') { | ||
this._output.trim(true); | ||
if (this._options.brace_style === "expand") { | ||
this._output.add_new_line(true); | ||
} | ||
} | ||
} else if (this._ch === ":") { | ||
for (var i = 0; i < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; i++) { | ||
if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[i])) { | ||
insideNonSemiColonValues = true; | ||
break; | ||
} | ||
} | ||
if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) { | ||
@@ -1411,2 +1435,3 @@ // 'property: value' delimiter | ||
} else if (this._ch === ';') { | ||
insideNonSemiColonValues = false; | ||
if (parenLevel === 0) { | ||
@@ -1453,5 +1478,12 @@ if (insidePropertyValue) { | ||
this.print_string(this._ch); | ||
this.eatWhitespace(); | ||
parenLevel++; | ||
this.indent(); | ||
// handle scss/sass map | ||
if (insidePropertyValue && previous_ch === "$" && this._options.selector_separator_newline) { | ||
this._output.add_new_line(); | ||
insideScssMap = true; | ||
} else { | ||
this.eatWhitespace(); | ||
parenLevel++; | ||
this.indent(); | ||
} | ||
} | ||
@@ -1463,2 +1495,7 @@ } else if (this._ch === ')') { | ||
} | ||
if (insideScssMap && this._input.peek() === ";" && this._options.selector_separator_newline) { | ||
insideScssMap = false; | ||
this.outdent(); | ||
this._output.add_new_line(); | ||
} | ||
this.print_string(this._ch); | ||
@@ -1468,3 +1505,3 @@ } else if (this._ch === ',') { | ||
this.eatWhitespace(true); | ||
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport && !insideAtExtend) { | ||
if (this._options.selector_separator_newline && (!insidePropertyValue || insideScssMap) && parenLevel === 0 && !insideAtImport && !insideAtExtend) { | ||
this._output.add_new_line(); | ||
@@ -1503,4 +1540,9 @@ } else { | ||
} else { | ||
this.preserveSingleSpace(isAfterSpace); | ||
var preserveAfterSpace = previous_ch === '"' || previous_ch === '\''; | ||
this.preserveSingleSpace(preserveAfterSpace || isAfterSpace); | ||
this.print_string(this._ch); | ||
if (!this._output.just_added_newline() && this._input.peek() === '\n' && insideNonSemiColonValues) { | ||
this._output.add_new_line(); | ||
} | ||
} | ||
@@ -1551,3 +1593,3 @@ } | ||
var BaseOptions = __webpack_require__(6).Options; | ||
var BaseOptions = (__webpack_require__(6).Options); | ||
@@ -1554,0 +1596,0 @@ function Options(options) { |
// copied from js-beautify/js/lib/beautify-css.js | ||
// version: 1.14.0 | ||
// version: 1.14.3 | ||
/* AUTO-GENERATED. DO NOT MODIFY. */ | ||
@@ -1008,4 +1008,4 @@ /* | ||
var Beautifier = __webpack_require__(16).Beautifier, | ||
Options = __webpack_require__(17).Options; | ||
var Beautifier = (__webpack_require__(16).Beautifier), | ||
Options = (__webpack_require__(17).Options); | ||
@@ -1057,6 +1057,6 @@ function css_beautify(source_text, options) { | ||
var Options = __webpack_require__(17).Options; | ||
var Output = __webpack_require__(2).Output; | ||
var InputScanner = __webpack_require__(8).InputScanner; | ||
var Directives = __webpack_require__(13).Directives; | ||
var Options = (__webpack_require__(17).Options); | ||
var Output = (__webpack_require__(2).Output); | ||
var InputScanner = (__webpack_require__(8).InputScanner); | ||
var Directives = (__webpack_require__(13).Directives); | ||
@@ -1097,2 +1097,5 @@ var directives_core = new Directives(/\/\*/, /\*\//); | ||
}; | ||
this.NON_SEMICOLON_NEWLINE_PROPERTY = [ | ||
"grid-template" | ||
]; | ||
@@ -1222,3 +1225,5 @@ } | ||
var insideAtImport = false; | ||
var insideScssMap = false; | ||
var topCharacter = this._ch; | ||
var insideNonSemiColonValues = false; | ||
var whitespace; | ||
@@ -1275,3 +1280,3 @@ var isAfterSpace; | ||
this.eatWhitespace(true); | ||
} else if (this._ch === '@') { | ||
} else if (this._ch === '@' || this._ch === '$') { | ||
this.preserveSingleSpace(isAfterSpace); | ||
@@ -1347,3 +1352,8 @@ | ||
} else { | ||
this.indent(); | ||
// inside mixin and first param is object | ||
if (previous_ch === '(') { | ||
this._output.space_before_token = false; | ||
} else if (previous_ch !== ',') { | ||
this.indent(); | ||
} | ||
this.print_string(this._ch); | ||
@@ -1380,3 +1390,17 @@ } | ||
} | ||
if (this._input.peek() === ')') { | ||
this._output.trim(true); | ||
if (this._options.brace_style === "expand") { | ||
this._output.add_new_line(true); | ||
} | ||
} | ||
} else if (this._ch === ":") { | ||
for (var i = 0; i < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; i++) { | ||
if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[i])) { | ||
insideNonSemiColonValues = true; | ||
break; | ||
} | ||
} | ||
if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) { | ||
@@ -1414,2 +1438,3 @@ // 'property: value' delimiter | ||
} else if (this._ch === ';') { | ||
insideNonSemiColonValues = false; | ||
if (parenLevel === 0) { | ||
@@ -1456,5 +1481,12 @@ if (insidePropertyValue) { | ||
this.print_string(this._ch); | ||
this.eatWhitespace(); | ||
parenLevel++; | ||
this.indent(); | ||
// handle scss/sass map | ||
if (insidePropertyValue && previous_ch === "$" && this._options.selector_separator_newline) { | ||
this._output.add_new_line(); | ||
insideScssMap = true; | ||
} else { | ||
this.eatWhitespace(); | ||
parenLevel++; | ||
this.indent(); | ||
} | ||
} | ||
@@ -1466,2 +1498,7 @@ } else if (this._ch === ')') { | ||
} | ||
if (insideScssMap && this._input.peek() === ";" && this._options.selector_separator_newline) { | ||
insideScssMap = false; | ||
this.outdent(); | ||
this._output.add_new_line(); | ||
} | ||
this.print_string(this._ch); | ||
@@ -1471,3 +1508,3 @@ } else if (this._ch === ',') { | ||
this.eatWhitespace(true); | ||
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport && !insideAtExtend) { | ||
if (this._options.selector_separator_newline && (!insidePropertyValue || insideScssMap) && parenLevel === 0 && !insideAtImport && !insideAtExtend) { | ||
this._output.add_new_line(); | ||
@@ -1506,4 +1543,9 @@ } else { | ||
} else { | ||
this.preserveSingleSpace(isAfterSpace); | ||
var preserveAfterSpace = previous_ch === '"' || previous_ch === '\''; | ||
this.preserveSingleSpace(preserveAfterSpace || isAfterSpace); | ||
this.print_string(this._ch); | ||
if (!this._output.just_added_newline() && this._input.peek() === '\n' && insideNonSemiColonValues) { | ||
this._output.add_new_line(); | ||
} | ||
} | ||
@@ -1554,3 +1596,3 @@ } | ||
var BaseOptions = __webpack_require__(6).Options; | ||
var BaseOptions = (__webpack_require__(6).Options); | ||
@@ -1557,0 +1599,0 @@ function Options(options) { |
{ | ||
"name": "vscode-html-languageservice", | ||
"version": "4.2.4", | ||
"version": "4.2.5", | ||
"description": "Language service for HTML", | ||
@@ -22,5 +22,5 @@ "main": "./lib/umd/htmlLanguageService.js", | ||
"@typescript-eslint/parser": "^5.15.0", | ||
"@vscode/web-custom-data": "^0.3.8", | ||
"@vscode/web-custom-data": "^0.3.9", | ||
"eslint": "^8.11.0", | ||
"js-beautify": "^1.14.0", | ||
"js-beautify": "^1.14.3", | ||
"mocha": "^9.2.2", | ||
@@ -27,0 +27,0 @@ "rimraf": "^3.0.2", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1567904
32881