X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c12bc4de5887421242de7f619b3c5e265bf631ac..d1fe917ba097fd8039a4340d1d82115f72cbbd91:/wxPython/samples/stxview/StructuredText/HTMLWithImages.py diff --git a/wxPython/samples/stxview/StructuredText/HTMLWithImages.py b/wxPython/samples/stxview/StructuredText/HTMLWithImages.py index 4d1e2f2b05..2b25a8891c 100644 --- a/wxPython/samples/stxview/StructuredText/HTMLWithImages.py +++ b/wxPython/samples/stxview/StructuredText/HTMLWithImages.py @@ -109,21 +109,16 @@ class HTMLWithImages(HTMLClass): output('\n') output('\n') - - def image(self, doc, level, output): - output('%s' % (doc.href, doc.getNodeValue())) - - def image(self, doc, level, output): if hasattr(doc, 'key'): - output('\n%s' % (doc.key, doc.href, doc.getNodeValue())) - else: - output('%s' % (doc.href, doc.getNodeValue())) - + output('\n' % doc.key) + output('%s\n' % (doc.href, doc.getNodeValue())) + if doc.getNodeValue() and hasattr(doc, 'key'): + output('

Figure %s %s

\n' % (doc.key, doc.getNodeValue())) def xref(self, doc, level, output): val = doc.getNodeValue() - output('%s' % (val, val) ) + output('Figure %s' % (val, val) )