Commits

Aram Dulyan committed 8e2093d

Some clean-up in the tests, and appending a space to image tags.

Comments (0)

Files changed (2)

             # Since the image syntax has a different structure, we define
             # the `textile` variable here. Note that `new_tag` must remain 
             # empty for this `textile` variant to be used.
-            textile = '%(space)s!%(class)s%(style)s%(lang)s%(src)s%(alt)s!' % {
+            textile = '%(space)s!%(class)s%(style)s%(lang)s%(src)s%(alt)s! ' % {
                 'space': '' if self._ends_with_newline() else ' ',
                 'src': safe_url(attrib.get('src', ''), ' !('),
                 'alt': alt,
 >>> convert('Whitespace <strong>   </strong> tags.')
 Whitespace  tags.
 
->>> convert('<em><a href="example.com"> Link. </a></em>')
-"_Link._":example.com
+>>> convert('<em><a href="http://example.com"> Link. </a></em>')
+"_Link._":http://example.com
 
->>> convert('<a href="example.com">  </a>')
+>>> convert('<a href="http://example.com">  </a>')
 <BLANKLINE>
 
 
 >>> convert('<img src="http://example.com/spaced(!) link.jpg" />')
 !http://example.com/spaced%28%21)%20link.jpg!
 
+>>> convert('<img src="image.jpg" />Flush text.')
+!image.jpg! Flush text.
+
 
 Test paragraphs:
 
 bq. Quoted text.
 
 Ensure links are not unnecessarily indented at the start of paragraphs.
->>> convert('<p><a href="example.com">Link</a></p><p><a href="example.com">Link</a></p>')
-"Link":example.com
+>>> convert('<p><a href="http://example.com">Link</a></p><p><a href="http://example.com">Link</a></p>')
+"Link":http://example.com
 <BLANKLINE>
-"Link":example.com
+"Link":http://example.com
 
 
 Test line breaks:
 ### Three.
 
 
+
 KNOWN ISSUES:
 
 #>>> convert('<p>---<em><br />*Note.</em>')
 ---
 _*Note.*
 
+Paragraphs with attributes in conjunction with links
+#>>> convert('<div id="identifier"><a href="http://example.com"><p><em>Example.</em></p></a></div>')
+"_Example._":http://example.com
+
 Ending simple tags after links.
 #>>> convert('<em>Click <a href="http://www.example.com">here.</a></em>')
 _Click ["here":http://example.com]_