Remove duplicate class names and spaces on sort
See original GitHub issueAwesome work on this plugin! The only thing Headwind is doing that’s currently missing is also removing duplicate class names and extra spaces. Would be a nice addition.
// before
<div className=" text-white bg-slate-900 bg-slate-900 "></div>
// after formatting
<div className=" bg-slate-900 bg-slate-900 text-white "></div>
// expected behavior
<div className="bg-slate-900 text-white"></div> // <-- trim
Issue Analytics
- State:
- Created 2 years ago
- Reactions:33
- Comments:7 (2 by maintainers)
Top Results From Across the Web
[Prettier Plugin] Remove duplicate class names and spaces ...
Awesome work on this plugin! The only thing Headwind is doing that's currently missing is also removing duplicate class names and extra spaces....
Read more >Remove duplicates from a sorted linked list - GeeksforGeeks
Write a function that takes a list sorted in non-decreasing order and deletes any duplicate nodes from the list. The list should only...
Read more >Removing duplicates from a list and sorting it using python
The strip function simply removes any leading/trailing whitespace (including spaces and tabs) and newline characters. Thus, it is how you get the raw...
Read more >Remove Duplicates from Sorted Array (With Solutions)
Given an integer array sorted in non-decreasing order, remove the duplicated such that the unique element appears only once.
Read more >Removing Duplicates Using SAS®
The SORT procedure supports three options for the removal of duplicates: ... used with either the NODUPKEYS or NODUPRECS option to name a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not only spaces but line breaks also should be removed
@reinink I can confirm it doesn’t remove extra spaces for
className