vscode-css-languageservice
Advanced tools
Comparing version 5.1.8 to 5.1.9
@@ -357,2 +357,17 @@ /*--------------------------------------------------------------------------------------------- | ||
var colorValues = functionNode.getArguments().getChildren(); | ||
if (colorValues.length === 1) { | ||
var functionArg = colorValues[0].getChildren(); | ||
if (functionArg.length === 1 && functionArg[0].type === nodes.NodeType.Expression) { | ||
colorValues = functionArg[0].getChildren(); | ||
if (colorValues.length === 3) { | ||
var lastValue = colorValues[2]; | ||
if (lastValue instanceof nodes.BinaryExpression) { | ||
var left = lastValue.getLeft(), right = lastValue.getRight(), operator = lastValue.getOperator(); | ||
if (left && right && operator && operator.matches('/')) { | ||
colorValues = [colorValues[0], colorValues[1], left, right]; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
if (!name || colorValues.length < 3 || colorValues.length > 4) { | ||
@@ -359,0 +374,0 @@ return null; |
@@ -6,2 +6,3 @@ /*--------------------------------------------------------------------------------------------- | ||
'use strict'; | ||
import { MarkupKind } from '../cssLanguageTypes'; | ||
export var browserNames = { | ||
@@ -90,4 +91,8 @@ E: 'Edge', | ||
} | ||
var description = typeof entry.description === 'string' ? entry.description : entry.description.value; | ||
result += textToMarkedString(description); | ||
if (typeof entry.description === 'string') { | ||
result += textToMarkedString(entry.description); | ||
} | ||
else { | ||
result += entry.description.kind === MarkupKind.Markdown ? entry.description.value : textToMarkedString(entry.description.value); | ||
} | ||
var browserLabel = getBrowserLabel(entry.browsers); | ||
@@ -94,0 +99,0 @@ if (browserLabel) { |
@@ -376,2 +376,17 @@ /*--------------------------------------------------------------------------------------------- | ||
var colorValues = functionNode.getArguments().getChildren(); | ||
if (colorValues.length === 1) { | ||
var functionArg = colorValues[0].getChildren(); | ||
if (functionArg.length === 1 && functionArg[0].type === nodes.NodeType.Expression) { | ||
colorValues = functionArg[0].getChildren(); | ||
if (colorValues.length === 3) { | ||
var lastValue = colorValues[2]; | ||
if (lastValue instanceof nodes.BinaryExpression) { | ||
var left = lastValue.getLeft(), right = lastValue.getRight(), operator = lastValue.getOperator(); | ||
if (left && right && operator && operator.matches('/')) { | ||
colorValues = [colorValues[0], colorValues[1], left, right]; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
if (!name || colorValues.length < 3 || colorValues.length > 4) { | ||
@@ -378,0 +393,0 @@ return null; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports"], factory); | ||
define(["require", "exports", "../cssLanguageTypes"], factory); | ||
} | ||
@@ -18,2 +18,3 @@ })(function (require, exports) { | ||
exports.getBrowserLabel = exports.textToMarkedString = exports.getEntryDescription = exports.browserNames = void 0; | ||
var cssLanguageTypes_1 = require("../cssLanguageTypes"); | ||
exports.browserNames = { | ||
@@ -104,4 +105,8 @@ E: 'Edge', | ||
} | ||
var description = typeof entry.description === 'string' ? entry.description : entry.description.value; | ||
result += textToMarkedString(description); | ||
if (typeof entry.description === 'string') { | ||
result += textToMarkedString(entry.description); | ||
} | ||
else { | ||
result += entry.description.kind === cssLanguageTypes_1.MarkupKind.Markdown ? entry.description.value : textToMarkedString(entry.description.value); | ||
} | ||
var browserLabel = getBrowserLabel(entry.browsers); | ||
@@ -108,0 +113,0 @@ if (browserLabel) { |
{ | ||
"name": "vscode-css-languageservice", | ||
"version": "5.1.8", | ||
"version": "5.1.9", | ||
"description": "Language service for CSS, LESS and SCSS", | ||
@@ -5,0 +5,0 @@ "main": "./lib/umd/cssLanguageService.js", |
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
2952822
69304