File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -794,16 +794,16 @@ function transformCss(ast: any, { env }: TransformerContext) {
794794}
795795
796796function transformAstro ( ast : any , { env, changes } : TransformerContext ) {
797- let { staticAttrs, dynamicAttrs } = env . customizations
797+ let { staticAttrs, dynamicAttrs, staticAttrsRegex , dynamicAttrsRegex } = env . customizations
798798
799799 if ( ast . type === 'element' || ast . type === 'custom-element' || ast . type === 'component' ) {
800800 for ( let attr of ast . attributes ?? [ ] ) {
801- if ( staticAttrs . has ( attr . name ) && attr . type === 'attribute' && attr . kind === 'quoted' ) {
801+ if ( hasMatch ( attr . name , staticAttrs , staticAttrsRegex ) && attr . type === 'attribute' && attr . kind === 'quoted' ) {
802802 attr . value = sortClasses ( attr . value , {
803803 env,
804804 } )
805805 } else if (
806- dynamicAttrs . has ( attr . name ) &&
806+ hasMatch ( attr . name , dynamicAttrs , dynamicAttrsRegex ) &&
807807 attr . type === 'attribute' &&
808808 attr . kind === 'expression' &&
809809 typeof attr . value === 'string'
You can’t perform that action at this time.
0 commit comments