adityatelange / hugo-PaperMod

A fast, clean, responsive Hugo theme.
https://adityatelange.github.io/hugo-PaperMod/
MIT License
9.53k stars 2.58k forks source link

fix(html): remove trailing slash on void elements #1470

Closed Rotzbua closed 4 months ago

Rotzbua commented 5 months ago

What does this PR change? What problem does it solve?

Remove trailing slash on void elements. https://developer.mozilla.org/en-US/docs/Glossary/Void_element

Was the change discussed in an issue or in the Discussions before?

fixes #1469

PR Checklist

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Rotzbua commented 4 months ago

@adityatelange I think you misunderstood the intention of my pull request.

Void elements make no harm, this change is unnecessary.

meta is always a void element. Just the syntax is wrong because html5 is not xhtml.

valid xhtml:

<meta value=""></meta>
<meta value="" />

valid html5:

<meta value="">

And you already use this correct syntax without the trailing slash: grafik

this change is unnecessary.

Yes it is not necessary because every browser can parse the generated html anyway. It is more a code style change than a functional change.

Kind of funny that they themselves use void elements.

Mozilla use static html generator. So the template has to be fixed like in this repository ;)