@@ -95,11 +95,6 @@ class Step {
9595 // TODO: ERROR HANDLING
9696 // TODO: Debug utils lib
9797
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-
10398 const tmpContent = this . content
10499 const WINDI_MATCHES = [ ...tmpContent . matchAll ( / w i n d i ` ( .* ?) ` / gi) ]
105100 if ( WINDI_MATCHES . length < 1 ) return this
@@ -135,9 +130,7 @@ class Step {
135130 // TODO: ERROR HANDLING
136131 // TODO: Debug utils lib
137132
138-
139- // FIXME: not bulletprof yet
140-
133+ // FIXME: #150 not bulletprof yet
141134 const tmpContent = this . content
142135 const ATTRIBUTIFY_CLASS_MATCHES = [ ...tmpContent . matchAll ( / ( [ \w + : _ / - ] + ) = ( [ ' " ] ) ( [ ! \w \s \n ~ : / \\ , % # [ \] . $ - ] * ?) \2/ gi) ]
143136 // TODO: allow prefix with ::
@@ -227,7 +220,7 @@ export class Magician {
227220 // TODO: Debug utils lib
228221
229222 let tmpContent = this . content
230- // FIXME: needs to be refactored. shouldn't remove comments completly, just for parsing
223+ // FIXME: CodeQL CODE WARNING
231224 tmpContent = tmpContent . replace ( / < ! - - [ \s \S ] * ?- - > / g, '' )
232225 tmpContent = tmpContent . replace ( / ( [ ! \w ] [ \w : _ / - ] * ?) : \( ( [ \w \s / - ] * ?) \) / gm, ( _ , groupOne : string , groupTwo : string ) =>
233226 groupTwo
@@ -280,14 +273,9 @@ export class Magician {
280273 this . css = ''
281274 const style = tmpContent . match ( / < s t y l e [ ^ > ] * ?( \/ | ( > ( [ \s \S ] * ?) < \/ s t y l e ) ) > / ) ?. [ 0 ]
282275 if ( style ) {
283- // var global = style.match(/\<style global\>/gi);
284276 const openTag = style . match ( / < s t y l e [ ^ > ] * ?> / gi) ?. [ 0 ] || '<style>'
277+ // FIXME: CODEQL CODE WARNING
285278 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- // }
291279 tmpContent = tmpContent . replace ( / < s t y l e [ ^ > ] * ?( \/ | ( > ( [ \s \S ] * ?) < \/ s t y l e ) ) > / g, `${ openTag } \n</style>` )
292280 tmpContent = tmpContent . replace ( '<style' , '<style windi:inject' )
293281 } else {
@@ -355,10 +343,7 @@ export class Magician {
355343
356344
357345 const directiveSet = new Set ( this . directives )
358- // console.log(directiveSet);
359346 const INTERPRETED_DIRECTIVE = this . processor . interpret ( Array . from ( directiveSet ) . join ( ' ' ) ) . styleSheet
360-
361- // console.log(this.attributifies);
362347 const startA = performance . now ( )
363348 const INTERPRETED_ATTRIBUTIFY = this . processor . attributify ( Object . fromEntries ( this . attributifies ) ) . styleSheet
364349 const endA = performance . now ( )
0 commit comments