Fixed emmet validation when open angle bracket is followed by space (#55762)

* Fixed emmet validation when open angle bracket is followed by space

* Fixed space check to support every kind of whitespace

* Added test
This commit is contained in:
Mathieu Déziel
2018-08-05 18:36:31 -04:00
committed by Ramya Rao
parent e0b36a98c2
commit f8420b48df
2 changed files with 16 additions and 0 deletions

View File

@@ -466,6 +466,16 @@ suite('Tests for jsx, xml and xsl', () => {
});
});
test('Expand abbreviation with condition containing less than sign for jsx', () => {
return withRandomFileEditor('if (foo < 10) { span.bar', 'javascriptreact', (editor, doc) => {
editor.selection = new Selection(0, 27, 0, 27);
return expandEmmetAbbreviation({ language: 'javascriptreact' }).then(() => {
assert.equal(editor.document.getText(), 'if (foo < 10) { <span className="bar"></span>');
return Promise.resolve();
});
});
});
test('No expanding text inside open tag in completion list (jsx)', () => {
return testNoCompletion('jsx', htmlContents, new Selection(2, 4, 2, 4));
});