File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,4 +33,19 @@ describe("index", () => {
3333 "{% block foo %}<div class="ms-auto flex items-center gap-[1.5rem] {% if buz %}is-buz{% endif %}">{{ bar }}</div>{% endblock %}"
3434 ` ) ;
3535 } ) ;
36+
37+ it ( "repeating classes" , async ( ) => {
38+ const result = await format (
39+ `<div class="p-0 container m-0"></div><div class="p-0 container m-0"></div><div class="p-0 container m-0"></div>` ,
40+ {
41+ parser : "anywhere" ,
42+ // @ts -ignore
43+ plugins : [ plugin ] ,
44+ } ,
45+ ) ;
46+
47+ expect ( result ) . toMatchInlineSnapshot ( `
48+ "<div class="container m-0 p-0"></div><div class="container m-0 p-0"></div><div class="container m-0 p-0"></div>"
49+ ` ) ;
50+ } ) ;
3651} ) ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export const parse = async (
3030 }
3131
3232 for ( const [ original , fixed ] of map ) {
33- formattedText = formattedText . replace ( original , fixed ) ;
33+ formattedText = formattedText . replaceAll ( original , fixed ) ;
3434 }
3535
3636 return {
You canāt perform that action at this time.
0 commit comments