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

Default Note component produces invalid HTML #9

Open
lduktus opened this issue May 17, 2023 · 0 comments
Open

Default Note component produces invalid HTML #9

lduktus opened this issue May 17, 2023 · 0 comments

Comments

@lduktus
Copy link

lduktus commented May 17, 2023

The default Note component creates a summary tag with details and then the element inside it. In most cases the Note will be at the end of a phrase, which will be inside a p tag. However the Note itself will also produce a p tag. As far as I am aware nested p tags, are invalid.

Additionally when using the w3.org validator it still warns about invalid p tags, even after removing them. It seems that summary tags will automatically close the p tag. Hence the closing p tag won't match any opening p tag.

This may be a minor issue and in my case all browsers that I used for testing display the output properly, but I think it is good to be aware about this. It connects to your comment in Elements.svelte:

This code doesn't distinguish between inlines and blocks. I'm sure that will eventually become an issue, but for now it works.

I am currently trying to add "default" footnotes by adding a link and than passing this value with the data to the parent, pushing everything to an array and then loop over it after calling the Document component. Not sure if this will work as it currently produces a 500.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant