Skip to content

Commit 75aea74

Browse files
authored
feat: bump emmet-helper (microsoft#210508)
Also add test
1 parent f1c0071 commit 75aea74

File tree

3 files changed

+30
-15
lines changed

3 files changed

+30
-15
lines changed

extensions/emmet/src/defaultCompletionProvider.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,6 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
187187
const config = getEmmetConfiguration(syntax!);
188188
const result = helper.doComplete(toLSTextDocument(document), position, syntax, config);
189189

190-
// https://github.com/microsoft/vscode/issues/86941
191-
if (result && result.items && result.items.length === 1) {
192-
if (result.items[0].label === 'widows: ;') {
193-
return undefined;
194-
}
195-
}
196-
197190
const newItems: vscode.CompletionItem[] = [];
198191
if (result && result.items) {
199192
result.items.forEach((item: any) => {

extensions/emmet/src/test/completion.test.ts

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,30 @@ suite('Tests for completion in CSS embedded in HTML', () => {
2929
});
3030

3131
// https://github.com/microsoft/vscode/issues/86941
32-
test('#86941, widows should not be completed', async () => {
33-
await testCompletionProvider('css', `.foo { wi| }`, undefined);
32+
test('#86941, widows should be completed after width', async () => {
33+
await testCompletionProvider('css', `.foo { wi| }`, [
34+
{ label: 'width: ;', documentation: `width: |;` }
35+
]);
36+
await testCompletionProvider('css', `.foo { wid| }`, [
37+
{ label: 'width: ;', documentation: `width: |;` }
38+
]);
39+
try {
40+
await testCompletionProvider('css', `.foo { wi| }`, [
41+
{ label: 'widows: ;', documentation: `widows: |;` }
42+
]);
43+
} catch (e) {
44+
assert.strictEqual(e.message, "Didn't find completion item with label widows: ;");
45+
}
46+
try {
47+
await testCompletionProvider('css', `.foo { wid| }`, [
48+
{ label: 'widows: ;', documentation: `widows: |;` }
49+
]);
50+
} catch (e) {
51+
assert.strictEqual(e.message, "Didn't find completion item with label widows: ;");
52+
}
53+
await testCompletionProvider('css', `.foo { wido| }`, [
54+
{ label: 'widows: ;', documentation: `widows: |;` }
55+
]);
3456
});
3557

3658
// https://github.com/microsoft/vscode/issues/117020

extensions/emmet/yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==
6060

6161
"@vscode/emmet-helper@^2.8.8":
62-
version "2.9.2"
63-
resolved "https://registry.yarnpkg.com/@vscode/emmet-helper/-/emmet-helper-2.9.2.tgz#cd5d1e64e7138ad76300e8cba5fd84f1c03e13ee"
64-
integrity sha512-MaGuyW+fa13q3aYsluKqclmh62Hgp0BpKIqS66fCxfOaBcVQ1OnMQxRRgQUYnCkxFISAQlkJ0qWWPyXjro1Qrg==
62+
version "2.9.3"
63+
resolved "https://registry.yarnpkg.com/@vscode/emmet-helper/-/emmet-helper-2.9.3.tgz#8a8b228981fcf2d9346fdca77b9ad5a31dc09dba"
64+
integrity sha512-rB39LHWWPQYYlYfpv9qCoZOVioPCftKXXqrsyqN1mTWZM6dTnONT63Db+03vgrBbHzJN45IrgS/AGxw9iiqfEw==
6565
dependencies:
6666
emmet "^2.4.3"
6767
jsonc-parser "^2.3.0"
@@ -70,9 +70,9 @@
7070
vscode-uri "^2.1.2"
7171

7272
emmet@^2.4.3:
73-
version "2.4.4"
74-
resolved "https://registry.yarnpkg.com/emmet/-/emmet-2.4.4.tgz#801aad64659dc76f3003130db767d77a78ac298e"
75-
integrity sha512-v8Mwpjym55CS3EjJgiCLWUB3J2HSR93jhzXW325720u8KvYxdI2voYLstW3pHBxFz54H6jFjayR9G4LfTG0q+g==
73+
version "2.4.7"
74+
resolved "https://registry.yarnpkg.com/emmet/-/emmet-2.4.7.tgz#19893c34e6274af14ea3c5729101e3c4ed18f01e"
75+
integrity sha512-O5O5QNqtdlnQM2bmKHtJgyChcrFMgQuulI+WdiOw2NArzprUqqxUW6bgYtKvzKgrsYpuLWalOkdhNP+1jluhCA==
7676
dependencies:
7777
"@emmetio/abbreviation" "^2.3.3"
7878
"@emmetio/css-abbreviation" "^2.1.8"

0 commit comments

Comments
 (0)