Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions html5lib/_inputstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import webencodings

from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase
from .constants import ReparseException
from .constants import _ReparseException
from . import _utils

from io import StringIO
Expand Down Expand Up @@ -530,7 +530,7 @@ def changeEncoding(self, newEncoding):
self.rawStream.seek(0)
self.charEncoding = (newEncoding, "certain")
self.reset()
raise ReparseException("Encoding changed from %s to %s" % (self.charEncoding[0], newEncoding))
raise _ReparseException("Encoding changed from %s to %s" % (self.charEncoding[0], newEncoding))

def detectBOM(self):
"""Attempts to detect at BOM at the start of the stream. If
Expand Down
2 changes: 1 addition & 1 deletion html5lib/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2943,5 +2943,5 @@ class DataLossWarning(UserWarning):
pass


class ReparseException(Exception):
class _ReparseException(Exception):
pass
4 changes: 2 additions & 2 deletions html5lib/html5parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
adjustForeignAttributes as adjustForeignAttributesMap,
adjustMathMLAttributes, adjustSVGAttributes,
E,
ReparseException
_ReparseException
)


Expand Down Expand Up @@ -83,7 +83,7 @@ def _parse(self, stream, innerHTML=False, container="div", scripting=False, **kw

try:
self.mainLoop()
except ReparseException:
except _ReparseException:
self.reset()
self.mainLoop()

Expand Down