Skip to content

Commit

Permalink
Update selector-type.js with new Attribute regex
Browse files Browse the repository at this point in the history
[^\]]* should work. What are you using to test it?
  • Loading branch information
skunkfrukt committed Oct 20, 2015
1 parent c115676 commit adad2e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/selector-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const SelectorType = {
*/
const SelectorCategoryRegex = {
Type : /^[A-Za-z]+/,
Attribute : /^[A-Za-z]+\[*\]$/,
Attribute : /^[A-Za-z]+\[[^\]]*\]$/,
};

/**
Expand Down Expand Up @@ -77,4 +77,4 @@ export default function getType(selector) {
return SelectorTypeRegex.Class.test(selector) ? SelectorType.Class :
SelectorTypeRegex.Id.test(selector) ? SelectorType.Id :
SelectorType.None;
}
}

0 comments on commit adad2e7

Please sign in to comment.