@@ -99,15 +99,15 @@ export class Magician {
99
99
if ( CLASS_MATCHES . length < 1 ) return this
100
100
for ( const match of CLASS_MATCHES ) {
101
101
const cleanMatch = match . groups ?. classes
102
- . replaceAll ( / w i n d i [ ` ] .+ ?[ ` ] / gi, ' ' ) // windi`XYZ`
103
- . replaceAll ( / (?< ! [ - ] ) [ $ ] (? = [ { ] ) / gi, ' ' ) // if leading char is not -, and next char is {, then remove $
104
- . replaceAll ( / (?< = ( [ { ] [ \w \s ] + [ ^ { ] * ?) ) [ ' " ] / gi, ' ' ) // remove quotes in curly braces
105
- . replaceAll ( / (?< = ( [ { ] [ \w \s ] + [ ^ { ] * ?) \s ) [: ] / gi, ' ' ) // remove : in curly braces
106
- . replaceAll ( / ( [ { ] [ \w \s ] + [ ^ { ] * ?[ ? ] ) / gi, ' ' ) // remove ? and condition in curly braces
107
- . replaceAll ( / [ { } ] / gi, ' ' ) // remove curly braces
108
- . replaceAll ( / \n / gi, ' ' ) // remove newline
109
- . replaceAll ( / { 2 , } / gi, ' ' ) // remove multiple spaces
110
- . replaceAll ( / [ " ' ` ] / gi, '' ) // remove quotes
102
+ . replace ( / w i n d i [ ` ] .+ ?[ ` ] / gi, ' ' ) // windi`XYZ`
103
+ . replace ( / (?< ! [ - ] ) [ $ ] (? = [ { ] ) / gi, ' ' ) // if leading char is not -, and next char is {, then remove $
104
+ . replace ( / (?< = ( [ { ] [ \w \s ] + [ ^ { ] * ?) ) [ ' " ] / gi, ' ' ) // remove quotes in curly braces
105
+ . replace ( / (?< = ( [ { ] [ \w \s ] + [ ^ { ] * ?) \s ) [: ] / gi, ' ' ) // remove : in curly braces
106
+ . replace ( / ( [ { ] [ \w \s ] + [ ^ { ] * ?[ ? ] ) / gi, ' ' ) // remove ? and condition in curly braces
107
+ . replace ( / [ { } ] / gi, ' ' ) // remove curly braces
108
+ . replace ( / \n / gi, ' ' ) // remove newline
109
+ . replace ( / { 2 , } / gi, ' ' ) // remove multiple spaces
110
+ . replace ( / [ " ' ` ] / gi, '' ) // remove quotes
111
111
112
112
this . classes = this . classes . concat (
113
113
( cleanMatch || '' ) . split ( ' ' ) . filter ( c => {
@@ -126,15 +126,15 @@ export class Magician {
126
126
if ( CLASS_MATCHES . length < 1 ) return this
127
127
for ( const match of CLASS_MATCHES ) {
128
128
const cleanMatch = match . groups ?. classes
129
- . replaceAll ( / w i n d i [ ` ] .+ ?[ ` ] / gi, ' ' ) // windi`XYZ`
130
- . replaceAll ( / (?< ! [ - ] ) [ $ ] (? = [ { ] ) / gi, ' ' ) // if leading char is not -, and next char is {, then remove $
131
- . replaceAll ( / (?< = ( [ { ] [ \w \s ] + [ ^ { ] * ?) ) [ ' " ] / gi, ' ' ) // remove quotes in curly braces
132
- . replaceAll ( / (?< = ( [ { ] [ \w \s ] + [ ^ { ] * ?) \s ) [: ] / gi, ' ' ) // remove : in curly braces
133
- . replaceAll ( / ( [ { ] [ \w \s ] + [ ^ { ] * ?[ ? ] ) / gi, ' ' ) // remove ? and condition in curly braces
134
- . replaceAll ( / [ { } ] / gi, ' ' ) // remove curly braces
135
- . replaceAll ( / \n / gi, ' ' ) // remove newline
136
- . replaceAll ( / { 2 , } / gi, ' ' ) // remove multiple spaces
137
- . replaceAll ( / [ " ' ` ] / gi, '' ) // remove quotes
129
+ . replace ( / w i n d i [ ` ] .+ ?[ ` ] / gi, ' ' ) // windi`XYZ`
130
+ . replace ( / (?< ! [ - ] ) [ $ ] (? = [ { ] ) / gi, ' ' ) // if leading char is not -, and next char is {, then remove $
131
+ . replace ( / (?< = ( [ { ] [ \w \s ] + [ ^ { ] * ?) ) [ ' " ] / gi, ' ' ) // remove quotes in curly braces
132
+ . replace ( / (?< = ( [ { ] [ \w \s ] + [ ^ { ] * ?) \s ) [: ] / gi, ' ' ) // remove : in curly braces
133
+ . replace ( / ( [ { ] [ \w \s ] + [ ^ { ] * ?[ ? ] ) / gi, ' ' ) // remove ? and condition in curly braces
134
+ . replace ( / [ { } ] / gi, ' ' ) // remove curly braces
135
+ . replace ( / \n / gi, ' ' ) // remove newline
136
+ . replace ( / { 2 , } / gi, ' ' ) // remove multiple spaces
137
+ . replace ( / [ " ' ` ] / gi, '' ) // remove quotes
138
138
139
139
this . classes = this . classes . concat (
140
140
( cleanMatch || '' ) . split ( ' ' ) . filter ( c => {
0 commit comments