Skip to content

Commit

Permalink
negate all whitespace in non-whitespace part of regex
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Jul 6, 2024
1 parent a58fe38 commit 67ec600
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ module.exports = grammar({

jsx_text: _ => choice(
// if there is a newline, only capture if there's non-whitespace-text
token.immediate(/[^{}<>&]*[^{}<>\n& ][^{}<>&]*/),
token.immediate(/[^{}<>&]*[^{}<>\s\p{Zs}\uFEFF\u2028\u2029\u2060\u200B&][^{}<>&]*/),
// whitespace between jsx_tags should be captured if there's no newline
token.immediate(/[^{}<>\n&]+/),
),
Expand Down

0 comments on commit 67ec600

Please sign in to comment.