Not sure if this relevant question or not
Here is an example HTML block
<div
>
</div>
Is there any easy way that I can change all those class names to a single line?
Expected output:
<div >
</div>
CodePudding user response:
In PhpStorm or any other JetBrains IDE:
- Select the lines
- Invoke "Code | Join Lines" (Ctrl Shift J here on a Windows keymap)
Final result:
<div ></div>
Notes:
- first line indent will remain
- may have an extra space in some places (in this case before the first class name:
<div class=" ltr:ml-auto
)