Skip to content

Commit

Permalink
v2.3.14
Browse files Browse the repository at this point in the history
Fix issue with regex detection in brackets.js

regex after the return keyword is mistaken for a division operator.
Expressions doesn't allow return, but...
  • Loading branch information
amarcruz committed Dec 3, 2015
1 parent 61aabbd commit 756b2b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var brackets = (function (UNDEF) {
// matches a division operator ($1) or a regex ($2).

S_QBSRC = STRINGS.source + '|' +
/(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/])/.source + '|' +
/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source + '|' +
/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,

// The predefined riot brackets
Expand Down

0 comments on commit 756b2b0

Please sign in to comment.