fix typos
This commit is contained in:
parent
e9afe36ff3
commit
76354c9677
|
@ -341,7 +341,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
|
||||||
callback(int(value[:-2]), *args)
|
callback(int(value[:-2]), *args)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
warnings.warn('Unable to parse length value '%s'' % value)
|
warnings.warn('Unable to parse length value "%s"' % value)
|
||||||
|
|
||||||
def __parse_font_size_cb(length, tag):
|
def __parse_font_size_cb(length, tag):
|
||||||
tag.set_property('size-points', length/display_resolution)
|
tag.set_property('size-points', length/display_resolution)
|
||||||
|
@ -477,7 +477,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
|
||||||
try:
|
try:
|
||||||
method = locals()['_parse_style_%s' % style.replace('-', '_')]
|
method = locals()['_parse_style_%s' % style.replace('-', '_')]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
warnings.warn('Style attribute '%s' not yet implemented' % style)
|
warnings.warn('Style attribute "%s" not yet implemented' % style)
|
||||||
else:
|
else:
|
||||||
__style_methods[style] = method
|
__style_methods[style] = method
|
||||||
del style
|
del style
|
||||||
|
@ -515,7 +515,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
|
||||||
try:
|
try:
|
||||||
method = self.__style_methods[attr]
|
method = self.__style_methods[attr]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
warnings.warn('Style attribute '%s' requested '
|
warnings.warn('Style attribute "%s" requested '
|
||||||
'but not yet implemented' % attr)
|
'but not yet implemented' % attr)
|
||||||
else:
|
else:
|
||||||
method(self, tag, val)
|
method(self, tag, val)
|
||||||
|
@ -717,7 +717,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
|
||||||
elif name in INLINE:
|
elif name in INLINE:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
warnings.warn('Unhandled element '%s'' % name)
|
warnings.warn('Unhandled element "%s"' % name)
|
||||||
|
|
||||||
def endElement(self, name):
|
def endElement(self, name):
|
||||||
endPreserving = False
|
endPreserving = False
|
||||||
|
@ -751,7 +751,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
|
||||||
if name == 'pre':
|
if name == 'pre':
|
||||||
endPreserving = True
|
endPreserving = True
|
||||||
else:
|
else:
|
||||||
warnings.warn('Unhandled element '%s'' % name)
|
warnings.warn("Unhandled element '%s'" % name)
|
||||||
self._flush_text()
|
self._flush_text()
|
||||||
if endPreserving:
|
if endPreserving:
|
||||||
self.preserve = False
|
self.preserve = False
|
||||||
|
|
Loading…
Reference in New Issue