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

Fix generated HTML #1880

Merged
merged 8 commits into from
Jun 20, 2024
Merged

Fix generated HTML #1880

merged 8 commits into from
Jun 20, 2024

Conversation

zecakeh
Copy link
Contributor

@zecakeh zecakeh commented Jun 20, 2024

I passed the spec pages through the W3C's Nu HTML Checker, and it returned a bunch of errors and warnings that were caused by our code. This PR fixes most of them.

See each commit's message for more details.

Pull Request Checklist

Preview: https://pr1880--matrix-spec-previews.netlify.app

It is invalid HTML for th to be the direct children of thead

Signed-off-by: Kévin Commaille <[email protected]>
A p HTML element cannot contain other block elements,
so the "parent" element is closed when the first "child" one is opened.

We need to use Page.RenderString with options
to force Hugo to keep the wrapping p elements
even if the content contains a single paragraph.

Signed-off-by: Kévin Commaille <[email protected]>
Signed-off-by: Kévin Commaille <[email protected]>
The a element start and end tags are mandatory.

Signed-off-by: Kévin Commaille <[email protected]>
@zecakeh zecakeh requested a review from a team as a code owner June 20, 2024 08:35
Signed-off-by: Kévin Commaille <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@richvdh richvdh merged commit 5fbfdd6 into matrix-org:main Jun 20, 2024
12 checks passed
@zecakeh zecakeh deleted the html-fixes branch June 20, 2024 08:48
@turt2live turt2live added the release-blocker Blocks the next release from happening label Jun 20, 2024
@turt2live turt2live mentioned this pull request Jun 20, 2024
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker Blocks the next release from happening
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants