vscode-css-languageservice
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -1086,3 +1086,3 @@ (function (factory) { | ||
Parser.prototype._parseHexColor = function () { | ||
if (this.peekRegExp(cssScanner_1.TokenType.Hash, /^#[0-9A-Fa-f]{3}([0-9A-Fa-f]{3})?$/g)) { | ||
if (this.peekRegExp(cssScanner_1.TokenType.Hash, /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)) { | ||
var node = this.create(nodes.HexColorValue); | ||
@@ -1089,0 +1089,0 @@ this.consumeToken(); |
@@ -490,6 +490,6 @@ (function (factory) { | ||
LintVisitor.prototype.visitUnknownNode = function (node) { | ||
// Rule: #eeff00 or #ef0 | ||
// Rule: #eeff0011 or #eeff00 or #ef01 or #ef0 | ||
if (node.type === nodes.NodeType.HexColorValue) { | ||
var text = node.getText(); | ||
if (text.length !== 7 && text.length !== 4) { | ||
if (text.length !== 9 && text.length !== 7 && text.length !== 5 && text.length !== 4) { | ||
this.addEntry(node, lintRules_1.Rules.HexColorLength); | ||
@@ -496,0 +496,0 @@ } |
@@ -42,3 +42,3 @@ (function (factory) { | ||
RequiredPropertiesForFontFace: new Rule('fontFaceProperties', localize('rule.fontFaceProperties', "@font-face rule must define 'src' and 'font-family' properties"), Warning), | ||
HexColorLength: new Rule('hexColorLength', localize('rule.hexColor', "Hex colors must consist of three or six hex numbers"), Error), | ||
HexColorLength: new Rule('hexColorLength', localize('rule.hexColor', "Hex colors must consist of three, four, six or eight hex numbers"), Error), | ||
ArgsInColorFunction: new Rule('argumentsInColorFunction', localize('rule.colorFunction', "Invalid number of parameters"), Error), | ||
@@ -45,0 +45,0 @@ UnknownProperty: new Rule('unknownProperties', localize('rule.unknownProperty', "Unknown property."), Warning), |
{ | ||
"name": "vscode-css-languageservice", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Language service for CSS, LESS and SCSS", | ||
@@ -5,0 +5,0 @@ "main": "./lib/cssLanguageService.js", |
Sorry, the diff of this file is too big to display
3639882
20654