예제 #1
0
 def test_break_url(self):
     """ Format URLs spanning across a line break
     """
     cross_inl = self.inl.replace('http:', 'http:\n')
     cross_ref = self.ref.replace('http:', 'http:')
     f = ForMd(cross_inl)
     ref_conv = list(f.ref_md())[0]
     self.assertEqual(cross_ref, ref_conv)
예제 #2
0
 def test_space_ref(self):
     """ Format links embedded in markdown lists
     """
     f = ForMd(self.space_ref)
     ref_conv = list(f.ref_md())[0]
     self.assertEqual(self.ref, ref_conv)
예제 #3
0
 def test_flip_lst_link(self):
     """ Format links embedded in markdown lists
     """
     f = ForMd(self.lref)
     inline_conv = list(f.inline_md())[0]
     self.assertEqual(self.linl, inline_conv)
예제 #4
0
 def test_flip(self):
     f = ForMd(self.ref)
     inline_conv = list(f.inline_md())[0]
     self.assertEqual(self.inl, inline_conv)
예제 #5
0
 def test_ref(self):
     f = ForMd(self.inl)
     ref_conv = list(f.ref_md())[0]
     self.assertEqual(self.ref, ref_conv)
예제 #6
0
 def test_none(self):
     f = ForMd(self.no_md)
     flip_conv = f.flip()
     f = ForMd(flip_conv)
     flip_conv = f.flip()
     self.assertEqual(self.no_md, flip_conv)