Josee9988 / MinifyAll

A 𝗩𝗦𝗖𝗼𝗱𝗲 𝗺𝗢𝗻𝗢𝗳𝗢𝗲𝗿 for JS, JSON/C, CSS, and HTML, you will love its simplicity! 🌟 π˜Ύπ™€π™’π™₯π™§π™šπ™¨π™¨ and π™œπ™―π™žπ™₯ files and folders πŸ“¦ Reduce your bundle and file sizes with lightning speed ⚑
https://minifyall.jgracia.es/
GNU General Public License v3.0
71 stars 10 forks source link

[Bug] Multi-line html breaks #172

Open jbasoo opened 1 year ago

jbasoo commented 1 year ago

🐞 Bug Report

Describe the bug

Minifying multi-line HTML elements results in the opening tag name and first attribute merging when using tabs.


Is this a regression?

Probably not, possibly related to https://github.com/Josee9988/MinifyAll/issues/16 ?


To Reproduce

Minifying a multi line element such as the following

<div>
    <img
        srcset="elva-fairy-480w.jpg 480w, elva-fairy-800w.jpg 800w"
        sizes="(max-width: 600px) 480px,
                     800px"
        src="elva-fairy-800w.jpg"
        alt="Elva dressed as a fairy" />
</div>

Results in merged img and srcset

<div><imgsrcset="elva-fairy-480w.jpg 480w, elva-fairy-800w.jpg 800w"sizes="(max-width: 600px) 480px, 800px"src="elva-fairy-800w.jpg"alt="Elva dressed as a fairy" /></div>

Expected behaviour

A space should be present between the tag name and attribute


Media prove

N/A


Your environment


Additional context

N/A

welcome[bot] commented 1 year ago

Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers!