File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- const VARIABLE_PATERN = '(?!\\d)[\\w_-][\\w\\d_-]*' ;
2- const VALUE_PATERN = '[^;]+|"(?:[^"]+|(?:\\\\"|[^"])*)"' ;
1+ const VARIABLE_PATTERN = '(?!\\d)[\\w_-][\\w\\d_-]*' ;
2+ const VALUE_PATTERN = '[^;]+|"(?:[^"]+|(?:\\\\"|[^"])*)"' ;
33const DECLARATION_PATTERN =
4- `\\$['"]?(${ VARIABLE_PATERN } )['"]?\\s*:\\s*(${ VALUE_PATERN } )(?:\\s*!(global|default)\\s*;|\\s*;(?![^\\{]*\\}))` ;
4+ `\\$['"]?(${ VARIABLE_PATTERN } )['"]?\\s*:\\s*(${ VALUE_PATTERN } )(?:\\s*!(global|default)\\s*;|\\s*;(?![^\\{]*\\}))` ;
55
6- const MAP_DECLARATIOM_REGEX = / [ ' " ] ? ( (? ! \d ) [ \w _ - ] [ \w \d _ - ] * ) [ ' " ] ? \s * : \s * ( [ a - z \- ] + \( [ ^ \) ] + \) | [ ^ \) \( , \/ ] + | \( [ ^ \) ] + \) ) / gi;
6+ const MAP_DECLARATION_REGEX = / [ ' " ] ? ( (? ! \d ) [ \w _ - ] [ \w \d _ - ] * ) [ ' " ] ? \s * : \s * ( [ a - z \- ] + \( [ ^ \) ] + \) | [ ^ \) \( , \/ ] + | \( [ ^ \) ] + \) ) / gi;
77
88const QUOTES_PATTERN = / ^ ( [ ' " ] ) .* \1$ / ;
99const QUOTES_REPLACE = / ^ ( [ ' " ] ) | ( [ ' " ] ) $ / g;
@@ -98,7 +98,7 @@ export class Parser {
9898 }
9999
100100 private extractMapDeclarations ( content : string ) : [ any ] {
101- const matches = content . match ( new RegExp ( MAP_DECLARATIOM_REGEX , 'g' ) ) ;
101+ const matches = content . match ( new RegExp ( MAP_DECLARATION_REGEX , 'g' ) ) ;
102102
103103 if ( ! matches ) {
104104 return [ ] as any ;
You can’t perform that action at this time.
0 commit comments