Exemplo n.º 1
0
 def test_attribute_with_colon(self):
     self.assertEqual(format_link("- attrib:is:: string"),
                      "- **[attrib:is](<attrib:is.md>):** string")
Exemplo n.º 2
0
 def test_attribute_new_line(self):
     self.assertEqual(format_link("  - attrib:: string\n  "
                                  "- attrib:: string"),
                      "  - **[attrib](<attrib.md>):** string\n "
                      " - **[attrib](<attrib.md>):** string")
Exemplo n.º 3
0
 def test_attribute(self):
     self.assertEqual(format_link("  - string:: link"), "  - **[string](<string.md>):** link")
Exemplo n.º 4
0
 def test_attribute_then_attribute_like(self):
     self.assertEqual(format_link("- attrib:: string:: val"),
                      "- **[attrib](<attrib.md>):** string:: val")
Exemplo n.º 5
0
 def test_one_hashtag(self):
     self.assertEqual(format_link("string #link."), "string [link](<link.md>).")
Exemplo n.º 6
0
 def test_two_hashtag(self):
     self.assertEqual(format_link("#link #other"),
                      "[link](<link.md>) [other](<other.md>)")
Exemplo n.º 7
0
 def test_two_links(self):
     self.assertEqual(format_link("[[link]] [[other]]"),
                      "[link](<link.md>) [other](<other.md>)")
Exemplo n.º 8
0
 def test_one_link_prefix(self):
     self.assertEqual(format_link("string [[link]].", link_prefix="../../"),
                      "string [link](<../../link.md>).")
Exemplo n.º 9
0
 def test_one_link(self):
     self.assertEqual(format_link("string [[link]]."), "string [link](<link.md>).")
Exemplo n.º 10
0
 def test_no_link(self):
     self.assertEqual(format_link("string"), "string")
Exemplo n.º 11
0
 def test_empty(self):
     self.assertEqual(format_link(""), "")