File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/Symfony/Component/AssetMapper/Compiler Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 28
28
final class JavaScriptImportPathCompiler implements AssetCompilerInterface
29
29
{
30
30
/**
31
- * @see https://regex101.com/r/1iBAIb/1
31
+ * @see https://regex101.com/r/1iBAIb/2
32
32
*/
33
33
private const IMPORT_PATTERN = '/
34
- ^
35
- (?:\/\/.*) # Lines that start with comments
34
+ ^(?:\/\/.*) # Lines that start with comments
36
35
|
37
36
(?:
38
- \'(?:[^ \'\\\\\n]| \\\\.)* \' # Strings enclosed in single quotes
37
+ \'(?:[^ \'\\\\\n]| \\\\.)*+ \' # Strings enclosed in single quotes
39
38
|
40
- "(?:[^" \\\\\n]| \\\\.)*" # Strings enclosed in double quotes
39
+ "(?:[^" \\\\\n]| \\\\.)*+ " # Strings enclosed in double quotes
41
40
)
42
41
|
43
42
(?: # Import statements (script captured)
@@ -49,7 +48,7 @@ final class JavaScriptImportPathCompiler implements AssetCompilerInterface
49
48
|
50
49
\bimport\(
51
50
)
52
- \s*[ \'"`](\.\/[^ \'"`\n]+|(\.\.\/)*[^ \'"`\n]+)[ \'"`]\s*[;\)]
51
+ \s*[ \'"`](\.\/[^ \'"`\n]++ |(\.\.\/)*+ [^ \'"`\n]+ +)[ \'"`]\s*[;\)]
53
52
?
54
53
/mx ' ;
55
54
You can’t perform that action at this time.
0 commit comments