[py-svn] r33446 - in py/dist/py/rst: . testing
guido at codespeak.net
guido at codespeak.net
Thu Oct 19 12:05:59 CEST 2006
Author: guido
Date: Thu Oct 19 12:05:57 2006
New Revision: 33446
Modified:
py/dist/py/rst/rst.py
py/dist/py/rst/testing/test_rst.py
Log:
Newline behind links block.
Modified: py/dist/py/rst/rst.py
==============================================================================
--- py/dist/py/rst/rst.py (original)
+++ py/dist/py/rst/rst.py Thu Oct 19 12:05:57 2006
@@ -85,7 +85,7 @@
link_texts = []
for link, target in self.links.iteritems():
link_texts.append(".. _`%s`: %s" % (link, target))
- return "\n" + "\n".join(link_texts) + "\n"
+ return "\n" + "\n".join(link_texts) + "\n\n"
def text(self):
outcome = []
Modified: py/dist/py/rst/testing/test_rst.py
==============================================================================
--- py/dist/py/rst/testing/test_rst.py (original)
+++ py/dist/py/rst/testing/test_rst.py Thu Oct 19 12:05:57 2006
@@ -113,3 +113,17 @@
'purus vel arcu. Morbi aliquam lacus et urna. Donec '
'commodo pellentesque mi.')).text()
assert txt == expected
+
+def test_title_following_links_empty_line():
+ expected = """\
+Foo, bar and `baz`_.
+
+.. _`baz`: http://www.baz.com
+
+Spam
+----
+
+Spam, eggs and spam.
+"""
+ txt = Rest(Paragraph("Foo, bar and ", Link("baz", "http://www.baz.com")),
+ Title('Spam'), Paragraph('Spam, eggs and spam.'))
More information about the py-svn
mailing list