Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions html5lib/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2939,8 +2939,14 @@


class DataLossWarning(UserWarning):
"""Raised whenever html5lib changes something in such a way that some input data is lost"""
Copy link
Member

Choose a reason for hiding this comment

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

Let's be more specific:

Raised when the current tree is unable to represent the input data

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll change this. Thanks!

pass


class ReparseException(Exception):
"""Raised when the parser should restart parsing
Copy link
Member

Choose a reason for hiding this comment

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

This should really be internal; it should never be raised through any public interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The way the docs are structured, it's difficult to make this not show up in the docs. I'll take away the docstring, but that's how it's going to have to live for 1.0.

Copy link
Member

Choose a reason for hiding this comment

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

We should probably just _ prefix it, I guess?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! If that's important, someone who is not me can write up an issue for making those changes and make them. If that makes it in time for 1.0, that's cool. Otherwise I'm not worrying about this.


This is used when the parsing discovers a new encoding that should be used.

"""
pass