reportlab: added pound sign
authorrgbecker
Fri, 28 Apr 2006 17:33:32 +0000
changeset 2585 ee08fea4505b
parent 2584 0fed2bd8ef90
child 2586 1cfd7c468127
reportlab: added pound sign
reportlab/platypus/paraparser.py
reportlab/test/test_platypus_paragraphs.py
--- a/reportlab/platypus/paraparser.py	Fri Apr 28 14:08:58 2006 +0000
+++ b/reportlab/platypus/paraparser.py	Fri Apr 28 17:33:32 2006 +0000
@@ -147,6 +147,8 @@
 #with additions suggested by Christoph Zwerschke who also suggested the
 #numeric entity names that follow.
 greeks = {
+    'pound': '\xc2\xa3',
+    'nbsp': '\xc2\xa0',
     'alefsym': '\xe2\x84\xb5',
     'Alpha': '\xce\x91',
     'alpha': '\xce\xb1',
@@ -459,10 +461,9 @@
             if attr: 
                 self._syntax_error('<unichar/> invalid attribute %s' % attr.keys()[0])
 
-
         if v is not None:
             self.handle_data(v)
-        self._push()
+        self._push(_selfClosingTag='unichar')
 
     def end_unichar(self):
         self._pop()
--- a/reportlab/test/test_platypus_paragraphs.py	Fri Apr 28 14:08:58 2006 +0000
+++ b/reportlab/test/test_platypus_paragraphs.py	Fri Apr 28 17:33:32 2006 +0000
@@ -131,7 +131,8 @@
 see how the AdSu one might be done generically, but the O'Reilly, unsure...
 I guess I'm hoping that I've missed something, and that
 it's actually easy to do using platypus.We can do greek letters <greek>mDngG</greek>. This should be a
-u with a dieresis on top "<unichar code=0xfc/>" and this "&#xfc;".
+u with a dieresis on top "<unichar code=0xfc/>" and this "&#xfc;". On the other hand this
+should be a pound sign "&pound;" &alpha;.
 '''
         from reportlab.platypus.flowables import ImageAndFlowables, Image
         from reportlab.lib.utils import _RL_DIR