Skip to content

Commit

Permalink
Merge pull request #29 from Microsoft/master
Browse files Browse the repository at this point in the history
Fix emmet for sass,stylus microsoft#42904
  • Loading branch information
TarasKovalenko committed Feb 5, 2018
2 parents 0c012e7 + a31d226 commit 7a2720a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions extensions/emmet/src/abbreviationActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a2720a

Please sign in to comment.