Skip to content

Commit

Permalink
Fix emmet for sass,stylus #42904
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Feb 5, 2018
1 parent dc5ebf3 commit f1b1300
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 f1b1300

Please sign in to comment.