Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed Apr 26, 2018
1 parent b29e87d commit 3102e76
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/services/cssCompletion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class CSSCompletion {
retrigger = true;
}
let item: CompletionItem = {
label: languageFacts.getEntryName(entry),
label: entry.name,
documentation: languageFacts.getEntryDescription(entry),
textEdit: TextEdit.replace(range, insertText),
kind: CompletionItemKind.Property
Expand Down
12 changes: 0 additions & 12 deletions src/services/languageFacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,18 +570,6 @@ export function getPageBoxDirectives(): string[] {
];
}

export function getEntryName(entry: { name: string, data?: any }) {
if (entry.data.status) {
if (entry.data.status === 'experimental') {
return `${entry.name} ⚠️`;
} else if (entry.data.status === 'nonstandard' || entry.data.status === 'obsolete') {
return `${entry.name} 🚨️`;
}
}

return entry.name;
}

export function getEntryDescription(entry: { description: string; browsers: Browsers, data?: any }): string | null {
if (!entry.description || entry.description === '') {
return null;
Expand Down
4 changes: 2 additions & 2 deletions src/test/css/completion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ suite('CSS - Completion', () => {
testCompletionFor('body { m|', {
items: [
{ label: 'mask', resultText: 'body { mask: ' },
{ label: 'mask-border ⚠️', resultText: 'body { mask-border: ' },
{ label: '-webkit-mask 🚨️', resultText: 'body { -webkit-mask: ' }
{ label: 'mask-border', resultText: 'body { mask-border: ' },
{ label: '-webkit-mask', resultText: 'body { -webkit-mask: ' }
]
});
});
Expand Down

0 comments on commit 3102e76

Please sign in to comment.