question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove duplicate class names and spaces on sort

See original GitHub issue

Awesome 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:closed
  • Created 2 years ago
  • Reactions:33
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
snax4acommented, Feb 7, 2022

Not only spaces but line breaks also should be removed

5reactions
Harry2Dcommented, Jan 27, 2022

@reinink I can confirm it doesn’t remove extra spaces for className

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found