paraparser: allow <a> as alias for <link>
authorrgbecker
Fri, 26 Jan 2007 12:46:22 +0000
changeset 2742 8edd54153201
parent 2740 5417e3e44724
child 2744 9472eedb9702
paraparser: allow <a> as alias for <link>
reportlab/platypus/paraparser.py
reportlab/test/test_platypus_paragraphs.py
--- a/reportlab/platypus/paraparser.py	Wed Jan 24 15:40:57 2007 +0000
+++ b/reportlab/platypus/paraparser.py	Fri Jan 26 12:46:22 2007 +0000
@@ -326,6 +326,7 @@
 #               fg/textColor/color=color
 #               backcolor/backColor/bgcolor=color
 #               dest/destination/target/href/link=target
+#       <a> alias for link
 #       <unichar name="unicode character name"/>
 #       <unichar value="unicode code point"/>
 #       <greek> - </greek>
@@ -406,6 +407,9 @@
         del self._stack[-1]
         assert frag.link!=None
 
+    start_a = start_link
+    end_a = end_link
+
     #### super script
     def start_super( self, attributes ):
         self._push(super=1)
--- a/reportlab/test/test_platypus_paragraphs.py	Wed Jan 24 15:40:57 2007 +0000
+++ b/reportlab/test/test_platypus_paragraphs.py	Fri Jan 26 12:46:22 2007 +0000
@@ -128,7 +128,7 @@
 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 &lt;unichar code=0xfc/&gt;="<unichar code=0xfc/>" and this &amp;#xfc;="&#xfc;" and this \\xc3\\xbc="\xc3\xbc". On the other hand this
-should be a pound sign &amp;pound;="&pound;" and this an alpha &amp;alpha;="&alpha;". You can have links in the page <link href=http://www.reportlab.com color=blue>ReportLab</link>.
+should be a pound sign &amp;pound;="&pound;" and this an alpha &amp;alpha;="&alpha;". You can have links in the page <link href=http://www.reportlab.com color=blue>ReportLab</link> &amp; <a href=http://www.reportlab.org color=green>ReportLab.org</a>.
 Use scheme "pdf:" to indicate an external PDF link, "http:", "https:" to indicate an external link eg something to open in
 your browser. If an internal link begins with something that looks like a scheme, precede with "document:". <strike>This text should have a strike through it.</strike>
 '''