Visitar URL original
The serializer sometimes omits the last token · Issue #342 · html5lib/html5lib-python · GitHub
The Wayback Machine - https://web.archive.org/web/20201014222849/https://github.com/html5lib/html5lib-python/issues/342
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

The serializer sometimes omits the last token #342

Closed
indivisible opened this issue May 2, 2017 · 3 comments
Closed

The serializer sometimes omits the last token #342

indivisible opened this issue May 2, 2017 · 3 comments

Comments

@indivisible
Copy link

@indivisible indivisible commented May 2, 2017

I've noticed that html5lib.serializer.HTMLSerializer sometimes does not emit the last closing tag for fragments.

Demonstration of the bug

@cjerdonek
Copy link

@cjerdonek cjerdonek commented May 2, 2017

I'm guessing this behavior is deliberate. Try this and you'll get a different result:

    serializer = HTMLSerializer(omit_optional_tags=False)
@indivisible
Copy link
Author

@indivisible indivisible commented May 2, 2017

I see, thanks. Although that seems like a terrible default.

@gsnedders
Copy link
Member

@gsnedders gsnedders commented May 3, 2017 •

We seem not to have a bug for changing to matching how the spec says to serialise stuff, which would change this… Oh well, we have #344 now.

As @cjerdonek says, this is by design.

@gsnedders gsnedders closed this May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.