diff test/test_templating.py @ 6299:fd0bdcbc68e4

issue2551104 - fix issue with markdown autolink next to punctuation Given: [label](http://example.com/). generated href including the ').' This fixes that.
author John Rouillard <rouilj@ieee.org>
date Sun, 20 Dec 2020 12:28:59 -0500
parents 3f7538316724
children 6f89cdc7c938
line wrap: on
line diff
--- a/test/test_templating.py	Sun Dec 20 11:09:26 2020 -0500
+++ b/test/test_templating.py	Sun Dec 20 12:28:59 2020 -0500
@@ -566,6 +566,11 @@
         m = self.mangleMarkdown2(m)
         self.assertEqual(m.rstrip('\n'), '<p><a href="http://example.com/" rel="nofollow noopener" title="a title">label</a></p>')
 
+        p = StringHTMLProperty(self.client, 'test', '1', None, 'test', u2s(u'[label](http://example.com/).'))
+        m = p.markdown(hyperlink=1)
+        m = self.mangleMarkdown2(m)
+        self.assertEqual(m.rstrip('\n'), '<p><a href="http://example.com/" rel="nofollow noopener">label</a>.</p>')
+
         p = StringHTMLProperty(self.client, 'test', '1', None, 'test', u2s(u'![](http://example.com/)'))
         m = p.markdown(hyperlink=1)
         m = self.mangleMarkdown2(m)

Roundup Issue Tracker: http://roundup-tracker.org/