예제 #1
0
 def test_excludes_trailing_closing_parenthesis(self):
     text = 'abc [email protected]) def'
     self.assertEqual(clean_up_email_links(text), 'abc [email](mailto:[email protected])) def')
예제 #2
0
 def test_excludes_leading_opening_parenthesis(self):
     text = 'abc ([email protected] def'
     self.assertEqual(clean_up_email_links(text), 'abc ([email](mailto:[email protected]) def')
예제 #3
0
 def test_excludes_trailing_comma_from_link(self):
     text = 'abc [email protected], def'
     self.assertEqual(clean_up_email_links(text), 'abc [email](mailto:[email protected]), def')
예제 #4
0
 def test_replaces_email_link_with_markdown(self):
     text = 'abc [email protected] def'
     self.assertEqual(clean_up_email_links(text), 'abc [email](mailto:[email protected]) def')