| 98 | | def test_creole_basic3(self): |
| 99 | | self.assertCreole(r""" |
| 100 | | Here is [[a internal]] link. |
| 101 | | This is [[http://domain.tld|external links]]. |
| 102 | | A [[internal links|different]] link name. |
| 103 | | """, """ |
| 104 | | <p>Here is <a href="a internal">a internal</a> link.<br /> |
| 105 | | This is <a href="http://domain.tld">external links</a>.<br /> |
| 106 | | A <a href="internal links">different</a> link name.</p> |
| 107 | | """) |
| | 98 | def test_bold_italics(self): |
| | 99 | self.assertCreole(r""" |
| | 100 | **//bold italics//** |
| | 101 | //**bold italics**// |
| | 102 | //This is **also** good.// |
| | 103 | """, """ |
| | 104 | <p><strong><i>bold italics</i></strong><br /> |
| | 105 | <i><strong>bold italics</strong></i><br /> |
| | 106 | <i>This is <strong>also</strong> good.</i></p> |
| | 107 | """) |
| | 108 | |
| | 109 | def test_internal_links(self): |
| | 110 | self.assertCreole(r""" |
| | 111 | A [[internal]] link... |
| | 112 | ...and [[/a internal]] link. |
| | 113 | """, """ |
| | 114 | <p>A <a href="internal">internal</a> link...<br /> |
| | 115 | ...and <a href="/a internal">/a internal</a> link.</p> |
| | 116 | """) |
| | 117 | |
| | 118 | def test_external_links(self): |
| | 119 | self.assertCreole(r""" |
| | 120 | With pipe separator: |
| | 121 | 1 [[internal links|link A]] test. |
| | 122 | 2 [[http://domain.tld|link B]] test. |
| | 123 | """, """ |
| | 124 | <p>With pipe separator:<br /> |
| | 125 | 1 <a href="internal links">link A</a> test.<br /> |
| | 126 | 2 <a href="http://domain.tld">link B</a> test.</p> |
| | 127 | """) |
| | 128 | |
| | 129 | def test_bolditalic_links(self): |
| | 130 | self.assertCreole(r""" |
| | 131 | //[[a internal]]// |
| | 132 | **[[Shortcut2|a page2]]** |
| | 133 | //**[[Shortcut3|a page3]]**// |
| | 134 | """, """ |
| | 135 | <p><i><a href="a internal">a internal</a></i><br /> |
| | 136 | <strong><a href="Shortcut2">a page2</a></strong><br /> |
| | 137 | <i><strong><a href="Shortcut3">a page3</a></strong></i></p> |
| | 138 | """) |
| | 139 | |
| | 140 | |
| 219 | | """) |
| 220 | | |
| 221 | | def test_bold_italics(self): |
| 222 | | self.assertCreole(r""" |
| 223 | | **//bold italics//** |
| 224 | | //**bold italics**// |
| 225 | | //This is **also** good.// |
| 226 | | |
| 227 | | //[[a page|this is italic]]// |
| 228 | | **[[a page]]** |
| 229 | | //**[[a page]]**// |
| 230 | | """, """ |
| 231 | | <p><strong><i>bold italics</i></strong><br /> |
| 232 | | <i><strong>bold italics</strong></i><br /> |
| 233 | | <i>This is <strong>also</strong> good.</i></p> |
| 234 | | |
| 235 | | <p><i><a href="a page">this is italic</a></i><br /> |
| 236 | | <strong><a href="a page">a page</a></strong><br /> |
| 237 | | <i><strong><a href="a page">a page</a></strong></i></p> |