File tree 2 files changed +7
-2
lines changed
packages/svelte/src/compiler/preprocess
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' svelte ' : patch
3
+ ---
4
+
5
+ chore: speed up regex
Original file line number Diff line number Diff line change @@ -253,9 +253,9 @@ function stringify_tag_attributes(attributes) {
253
253
}
254
254
255
255
const regex_style_tags =
256
- / < ! - - [ ^ ] * ?- - > | < s t y l e ( (?: \s + [ ^ = > ' " \/ ] + = (?: " [ ^ " ] * " | ' [ ^ ' ] * ' | [ ^ > \s ] + ) | \s + [ ^ = > ' " \/ ] + ) * \s * ) (?: \/ > | > ( [ \S \s ] * ?) < \/ s t y l e > ) / g;
256
+ / < ! - - [ ^ ] * ?- - > | < s t y l e ( (?: \s + [ ^ = > ' " \/ \s ] + = (?: " [ ^ " ] * " | ' [ ^ ' ] * ' | [ ^ > \s ] + ) | \s + [ ^ = > ' " \/ \s ] + ) * \s * ) (?: \/ > | > ( [ \S \s ] * ?) < \/ s t y l e > ) / g;
257
257
const regex_script_tags =
258
- / < ! - - [ ^ ] * ?- - > | < s c r i p t ( (?: \s + [ ^ = > ' " \/ ] + = (?: " [ ^ " ] * " | ' [ ^ ' ] * ' | [ ^ > \s ] + ) | \s + [ ^ = > ' " \/ ] + ) * \s * ) (?: \/ > | > ( [ \S \s ] * ?) < \/ s c r i p t > ) / g;
258
+ / < ! - - [ ^ ] * ?- - > | < s c r i p t ( (?: \s + [ ^ = > ' " \/ \s ] + = (?: " [ ^ " ] * " | ' [ ^ ' ] * ' | [ ^ > \s ] + ) | \s + [ ^ = > ' " \/ \s ] + ) * \s * ) (?: \/ > | > ( [ \S \s ] * ?) < \/ s c r i p t > ) / g;
259
259
260
260
/**
261
261
* Calculate the updates required to process all instances of the specified tag.
You can’t perform that action at this time.
0 commit comments