Skip to content

Commit 77c1fd3

Browse files
committed
fix regex
1 parent 8ad7010 commit 77c1fd3

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/src/compiler/phases/1-parse/read

1 file changed

+1
-1
lines changed

packages/svelte/src/compiler/phases/1-parse/read/style.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const REGEX_ATTRIBUTE_FLAGS = /^[a-zA-Z]+/; // only `i` and `s` are valid today,
66
const REGEX_COMBINATOR_WHITESPACE = /^\s*(\+|~|>|\|\|)\s*/;
77
const REGEX_COMBINATOR = /^(\+|~|>|\|\|)/;
88
const REGEX_PERCENTAGE = /^\d+(\.\d+)?%/;
9-
const REGEX_NTH_OF = /^\s*(even|odd|(-?[0-9]?n?(\s*\+\s*[0-9]+)?))(\s*(?=[,)])|\s+of\s+)/;
9+
const REGEX_NTH_OF = /^\s*(even|odd|(-?[0-9]*n?(\s*\+\s*[0-9]+)?))(\s*(?=[,)])|\s+of\s+)/;
1010
const REGEX_WHITESPACE_OR_COLON = /[\s:]/;
1111
const REGEX_BRACE_OR_SEMICOLON = /[{;]/;
1212
const REGEX_LEADING_HYPHEN_OR_DIGIT = /-?\d/;

0 commit comments

Comments
 (0)