vscode-css-languageservice
Advanced tools
Comparing version 3.0.9-next.10 to 3.0.9-next.11
@@ -187,2 +187,5 @@ /*--------------------------------------------------------------------------------------------- | ||
}; | ||
if (entry.restrictions.length === 1 && entry.restrictions[0] === 'none') { | ||
retrigger = false; | ||
} | ||
if (retrigger) { | ||
@@ -189,0 +192,0 @@ item.command = { |
@@ -557,12 +557,31 @@ /*--------------------------------------------------------------------------------------------- | ||
export function getEntryDescription(entry) { | ||
var desc = entry.description || ''; | ||
if (!entry.description || entry.description === '') { | ||
return null; | ||
} | ||
var desc = ''; | ||
if (entry.data && entry.data.status) { | ||
desc += getEntryStatus(entry.data.status); | ||
} | ||
desc += entry.description; | ||
var browserLabel = getBrowserLabel(entry.browsers); | ||
if (browserLabel) { | ||
if (desc) { | ||
desc = desc + '\n'; | ||
} | ||
desc = desc + '(' + browserLabel + ')'; | ||
desc += '\n(' + browserLabel + ')'; | ||
} | ||
if (entry.data && entry.data.syntax) { | ||
desc += "\n\nSyntax: " + entry.data.syntax; | ||
} | ||
return desc; | ||
} | ||
function getEntryStatus(status) { | ||
switch (status) { | ||
case 'experimental': | ||
return '⚠️ Property is experimental. Be cautious to use it.️\n\n'; | ||
case 'nonstandard': | ||
return '🚨️ Property is nonstandard. Avoid using it.\n\n'; | ||
case 'obsolete': | ||
return '🚨️️️ Property is obsolete. Avoid using it.\n\n'; | ||
default: | ||
return ''; | ||
} | ||
} | ||
export function getBrowserLabel(b) { | ||
@@ -708,3 +727,3 @@ var result = ''; | ||
propertySet = {}; | ||
for (var i = 0, len = properties.length; i < len; i++) { | ||
for (var i = 0; i < properties.length; i++) { | ||
var rawEntry = properties[i]; | ||
@@ -711,0 +730,0 @@ propertySet[rawEntry.name] = new EntryImpl(rawEntry); |
@@ -197,2 +197,5 @@ (function (factory) { | ||
}; | ||
if (entry.restrictions.length === 1 && entry.restrictions[0] === 'none') { | ||
retrigger = false; | ||
} | ||
if (retrigger) { | ||
@@ -199,0 +202,0 @@ item.command = { |
@@ -578,13 +578,32 @@ (function (factory) { | ||
function getEntryDescription(entry) { | ||
var desc = entry.description || ''; | ||
if (!entry.description || entry.description === '') { | ||
return null; | ||
} | ||
var desc = ''; | ||
if (entry.data && entry.data.status) { | ||
desc += getEntryStatus(entry.data.status); | ||
} | ||
desc += entry.description; | ||
var browserLabel = getBrowserLabel(entry.browsers); | ||
if (browserLabel) { | ||
if (desc) { | ||
desc = desc + '\n'; | ||
} | ||
desc = desc + '(' + browserLabel + ')'; | ||
desc += '\n(' + browserLabel + ')'; | ||
} | ||
if (entry.data && entry.data.syntax) { | ||
desc += "\n\nSyntax: " + entry.data.syntax; | ||
} | ||
return desc; | ||
} | ||
exports.getEntryDescription = getEntryDescription; | ||
function getEntryStatus(status) { | ||
switch (status) { | ||
case 'experimental': | ||
return '⚠️ Property is experimental. Be cautious to use it.️\n\n'; | ||
case 'nonstandard': | ||
return '🚨️ Property is nonstandard. Avoid using it.\n\n'; | ||
case 'obsolete': | ||
return '🚨️️️ Property is obsolete. Avoid using it.\n\n'; | ||
default: | ||
return ''; | ||
} | ||
} | ||
function getBrowserLabel(b) { | ||
@@ -731,3 +750,3 @@ var result = ''; | ||
propertySet = {}; | ||
for (var i = 0, len = properties.length; i < len; i++) { | ||
for (var i = 0; i < properties.length; i++) { | ||
var rawEntry = properties[i]; | ||
@@ -734,0 +753,0 @@ propertySet[rawEntry.name] = new EntryImpl(rawEntry); |
{ | ||
"name": "vscode-css-languageservice", | ||
"version": "3.0.9-next.10", | ||
"version": "3.0.9-next.11", | ||
"description": "Language service for CSS, LESS and SCSS", | ||
@@ -21,2 +21,3 @@ "main": "./lib/umd/cssLanguageService.js", | ||
"istanbul": "^0.4.5", | ||
"mdn-data": "^1.1.1", | ||
"mkdirp": "^0.5.1", | ||
@@ -23,0 +24,0 @@ "mocha": "^5.0.4", |
@@ -64,1 +64,6 @@ # vscode-css-languageservice | ||
Copyright 2016, Microsoft | ||
With the exceptions of, | ||
- `build/mdn-documentation.js`, which is built upon content from [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web) | ||
and distributed under CC BY-SA 2.5. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2109652
46011
68
10