提交 a31d226c 编写于 作者: R Ramya Achutha Rao

Fix emmet for sass,stylus #42904

上级 1f21503c
......@@ -237,17 +237,17 @@ export function isValidLocationForEmmetAbbreviation(document: vscode.TextDocumen
return true;
}
// Fix for upstream issue https://github.com/emmetio/css-parser/issues/3
if (currentNode.type === 'property'
&& currentNode.parent
&& currentNode.parent.type !== 'rule'
&& currentNode.parent.type !== 'at-rule') {
return false;
}
// Fix for https://github.com/Microsoft/vscode/issues/34162
// Other than sass, stylus, we can make use of the terminator tokens to validate position
if (syntax !== 'sass' && syntax !== 'stylus' && currentNode.type === 'property') {
// Fix for upstream issue https://github.com/emmetio/css-parser/issues/3
if (currentNode.parent
&& currentNode.parent.type !== 'rule'
&& currentNode.parent.type !== 'at-rule') {
return false;
}
const abbreviation = document.getText(new vscode.Range(abbreviationRange.start.line, abbreviationRange.start.character, abbreviationRange.end.line, abbreviationRange.end.character));
const propertyNode = <Property>currentNode;
if (propertyNode.terminatorToken
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册