Skip to content

Commit

Permalink
fix: completion leaks when have empty attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
voorjaar committed May 22, 2021
1 parent 0642a6a commit de63ea4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/filetypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function allowAttr(type: string): boolean {
return type ? ['html', 'js'].includes(type) : true;
}

const classPattern = String.raw`(class(Name)?\s*=\s*\S?\s*["'\`])[^"'\`]*$`;
const classPattern = String.raw`(class(Name)?\s*=\s*{?\s*["'\`])[^"'\`]*$`;
const emmetPattern = String.raw`\.\S*$`;
const applyPattern = String.raw`@apply\s+[^;]*$`;
const htmlPattern = getConfig('windicss.enableEmmetCompletion') ? [ classPattern, applyPattern, emmetPattern ] : [ classPattern, applyPattern ];
Expand Down

0 comments on commit de63ea4

Please sign in to comment.