Skip to content

Commit

Permalink
allow for space between comma and bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehaas committed Oct 26, 2023
1 parent eabc37d commit 9cc1e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/jsx/jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
}

function jsToken(stream, state, cx) {
if (stream.peek() == "<" && stream.string.indexOf(',>', stream.start) < 0 && jsMode.expressionAllowed(stream, cx.state)) {
if (stream.peek() == "<" && !/,\s*>/.test(stream.string) && jsMode.expressionAllowed(stream, cx.state)) {
state.context = new Context(CodeMirror.startState(xmlMode, jsMode.indent(cx.state, "", "")),
xmlMode, 0, state.context)
jsMode.skipExpression(cx.state)
Expand Down

0 comments on commit 9cc1e18

Please sign in to comment.