Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing slash on void element #11091

Open
3 tasks done
Rotzbua opened this issue May 7, 2024 · 4 comments · May be fixed by #11092
Open
3 tasks done

Trailing slash on void element #11091

Rotzbua opened this issue May 7, 2024 · 4 comments · May be fixed by #11092
Labels
🐛 bug Something isn't working, or isn't working as expected p2 We want to address this but may have other higher priority items.

Comments

@Rotzbua
Copy link

Rotzbua commented May 7, 2024

Summary

From Nu Html Checker: Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.

URL

https://developer.mozilla.org/en-US/docs/Glossary/Void_element

Reproduction steps

  1. Open html source code in browser and look html up or
  2. Use online tool: https://validator.w3.org/nu/?doc=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FGlossary%2FVoid_element

Expected behavior

Correct html:

<meta charset="utf-8">

Actual behavior

Formal wrong html:

<meta charset="utf-8"/>

Device

Desktop

Browser

Firefox

Browser version

Stable

Operating system

Windows

Screenshot

No response

Anything else?

No response

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label May 7, 2024
@Rotzbua Rotzbua linked a pull request May 7, 2024 that will close this issue
@estelle
Copy link
Member

estelle commented May 8, 2024

This has been discussed https://github.com/orgs/mdn/discussions/242

We are not removing the trailing slashes. Doing so would require forking Prettier. The MDN Web Docs team has decided not to fork Prettier as it would introduce a big maintenance burden that is not sustainable. Concerns can be addressed to the Prettier project.

@pepelsbey
Copy link
Contributor

We are not removing the trailing slashes. Doing so would require forking Prettier.

@estelle not exactly, there’s a Prettier plugin that overrides this setting. So, if we ever reconsider this decision, it would be possible to implement it.

@Rotzbua
Copy link
Author

Rotzbua commented May 15, 2024

The discussion is about the examples and content. As far as I have checked, prettier is not applied to the HTML template for the website.

@pepelsbey
Copy link
Contributor

The discussion is about the examples and content. As far as I have checked, prettier is not applied to the HTML template for the website.

There’s a .prettierrc config and a test running prettier check in the packgage.json. We apply the same code style across all MDN projects.

@fiji-flo fiji-flo added 🐛 bug Something isn't working, or isn't working as expected p2 We want to address this but may have other higher priority items. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working, or isn't working as expected p2 We want to address this but may have other higher priority items.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants