Skip to content

Commit ae45e2b

Browse files
committed
[javascript mode] Also allow a regexp after 'default'
(For 'export default' syntax) Issue #4452
1 parent 708084a commit ae45e2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/javascript/javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"use strict";
1313

1414
function expressionAllowed(stream, state, backUp) {
15-
return /^(?:operator|sof|keyword c|case|new|export|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
15+
return /^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
1616
(state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
1717
}
1818

0 commit comments

Comments
 (0)