rename markupbase to _markupbase
This commit is contained in:
parent
15c3254958
commit
cb5c80f6d9
|
@ -8,7 +8,7 @@
|
||||||
# and CDATA (character data -- only end tags are special).
|
# and CDATA (character data -- only end tags are special).
|
||||||
|
|
||||||
|
|
||||||
import markupbase
|
import _markupbase
|
||||||
import re
|
import re
|
||||||
|
|
||||||
# Regular expressions used for parsing
|
# Regular expressions used for parsing
|
||||||
|
@ -64,7 +64,7 @@ class HTMLParseError(Exception):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
class HTMLParser(markupbase.ParserBase):
|
class HTMLParser(_markupbase.ParserBase):
|
||||||
"""Find tags and other markup and call handler functions.
|
"""Find tags and other markup and call handler functions.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
@ -96,7 +96,7 @@ class HTMLParser(markupbase.ParserBase):
|
||||||
self.rawdata = ''
|
self.rawdata = ''
|
||||||
self.lasttag = '???'
|
self.lasttag = '???'
|
||||||
self.interesting = interesting_normal
|
self.interesting = interesting_normal
|
||||||
markupbase.ParserBase.reset(self)
|
_markupbase.ParserBase.reset(self)
|
||||||
|
|
||||||
def feed(self, data):
|
def feed(self, data):
|
||||||
"""Feed data to the parser.
|
"""Feed data to the parser.
|
||||||
|
|
|
@ -28,7 +28,7 @@ class ParserBase:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
if self.__class__ is ParserBase:
|
if self.__class__ is ParserBase:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"markupbase.ParserBase must be subclassed")
|
"_markupbase.ParserBase must be subclassed")
|
||||||
|
|
||||||
def error(self, message):
|
def error(self, message):
|
||||||
raise NotImplementedError(
|
raise NotImplementedError(
|
|
@ -9,7 +9,7 @@
|
||||||
# not supported at all.
|
# not supported at all.
|
||||||
|
|
||||||
|
|
||||||
import markupbase
|
import _markupbase
|
||||||
import re
|
import re
|
||||||
|
|
||||||
__all__ = ["SGMLParser", "SGMLParseError"]
|
__all__ = ["SGMLParser", "SGMLParseError"]
|
||||||
|
@ -52,7 +52,7 @@ class SGMLParseError(RuntimeError):
|
||||||
# chunks). Entity references are passed by calling
|
# chunks). Entity references are passed by calling
|
||||||
# self.handle_entityref() with the entity reference as argument.
|
# self.handle_entityref() with the entity reference as argument.
|
||||||
|
|
||||||
class SGMLParser(markupbase.ParserBase):
|
class SGMLParser(_markupbase.ParserBase):
|
||||||
# Definition of entities -- derived classes may override
|
# Definition of entities -- derived classes may override
|
||||||
entity_or_charref = re.compile('&(?:'
|
entity_or_charref = re.compile('&(?:'
|
||||||
'([a-zA-Z][-.a-zA-Z0-9]*)|#([0-9]+)'
|
'([a-zA-Z][-.a-zA-Z0-9]*)|#([0-9]+)'
|
||||||
|
@ -71,7 +71,7 @@ class SGMLParser(markupbase.ParserBase):
|
||||||
self.lasttag = '???'
|
self.lasttag = '???'
|
||||||
self.nomoretags = 0
|
self.nomoretags = 0
|
||||||
self.literal = 0
|
self.literal = 0
|
||||||
markupbase.ParserBase.reset(self)
|
_markupbase.ParserBase.reset(self)
|
||||||
|
|
||||||
def setnomoretags(self):
|
def setnomoretags(self):
|
||||||
"""Enter literal mode (CDATA) till EOF.
|
"""Enter literal mode (CDATA) till EOF.
|
||||||
|
|
Loading…
Reference in New Issue