@@ -95,11 +95,6 @@ class Step {
95
95
// TODO: ERROR HANDLING
96
96
// TODO: Debug utils lib
97
97
98
- // let WINDI_EXPRESSION = lines[i].toString().match(/windi\`(.*?)\`/i);
99
- // if (WINDI_EXPRESSION) {
100
- // const INTERPRETED_WINDI_EXPRESSION = PROCESSOR.interpret(WINDI_EXPRESSION[1]);
101
- // }
102
-
103
98
const tmpContent = this . content
104
99
const WINDI_MATCHES = [ ...tmpContent . matchAll ( / w i n d i ` ( .* ?) ` / gi) ]
105
100
if ( WINDI_MATCHES . length < 1 ) return this
@@ -135,9 +130,7 @@ class Step {
135
130
// TODO: ERROR HANDLING
136
131
// TODO: Debug utils lib
137
132
138
-
139
- // FIXME: not bulletprof yet
140
-
133
+ // FIXME: #150 not bulletprof yet
141
134
const tmpContent = this . content
142
135
const ATTRIBUTIFY_CLASS_MATCHES = [ ...tmpContent . matchAll ( / ( [ \w + : _ / - ] + ) = ( [ ' " ] ) ( [ ! \w \s \n ~ : / \\ , % # [ \] . $ - ] * ?) \2/ gi) ]
143
136
// TODO: allow prefix with ::
@@ -227,7 +220,7 @@ export class Magician {
227
220
// TODO: Debug utils lib
228
221
229
222
let tmpContent = this . content
230
- // FIXME: needs to be refactored. shouldn't remove comments completly, just for parsing
223
+ // FIXME: CodeQL CODE WARNING
231
224
tmpContent = tmpContent . replace ( / < ! - - [ \s \S ] * ?- - > / g, '' )
232
225
tmpContent = tmpContent . replace ( / ( [ ! \w ] [ \w : _ / - ] * ?) : \( ( [ \w \s / - ] * ?) \) / gm, ( _ , groupOne : string , groupTwo : string ) =>
233
226
groupTwo
@@ -280,14 +273,9 @@ export class Magician {
280
273
this . css = ''
281
274
const style = tmpContent . match ( / < s t y l e [ ^ > ] * ?( \/ | ( > ( [ \s \S ] * ?) < \/ s t y l e ) ) > / ) ?. [ 0 ]
282
275
if ( style ) {
283
- // var global = style.match(/\<style global\>/gi);
284
276
const openTag = style . match ( / < s t y l e [ ^ > ] * ?> / gi) ?. [ 0 ] || '<style>'
277
+ // FIXME: CODEQL CODE WARNING
285
278
this . css = style . replace ( / < \/ ? s t y l e [ ^ > ] * > / g, '' )
286
- // if (global) {
287
- // this.stylesheets.push(this.useGlobal(new CSSParser(css, this.processor).parse()));
288
- // } else {
289
- // this.stylesheets.push(new CSSParser(css, this.processor).parse());
290
- // }
291
279
tmpContent = tmpContent . replace ( / < s t y l e [ ^ > ] * ?( \/ | ( > ( [ \s \S ] * ?) < \/ s t y l e ) ) > / g, `${ openTag } \n</style>` )
292
280
tmpContent = tmpContent . replace ( '<style' , '<style windi:inject' )
293
281
} else {
@@ -355,10 +343,7 @@ export class Magician {
355
343
356
344
357
345
const directiveSet = new Set ( this . directives )
358
- // console.log(directiveSet);
359
346
const INTERPRETED_DIRECTIVE = this . processor . interpret ( Array . from ( directiveSet ) . join ( ' ' ) ) . styleSheet
360
-
361
- // console.log(this.attributifies);
362
347
const startA = performance . now ( )
363
348
const INTERPRETED_ATTRIBUTIFY = this . processor . attributify ( Object . fromEntries ( this . attributifies ) ) . styleSheet
364
349
const endA = performance . now ( )
0 commit comments