(self)
| 28 | default_kwargs = {'extensions': ['smarty']} |
| 29 | |
| 30 | def test_basic(self): |
| 31 | self.assertMarkdownRenders( |
| 32 | "It's fun. What's fun?", |
| 33 | '<p>It’s fun. What’s fun?</p>' |
| 34 | ) |
| 35 | self.assertMarkdownRenders( |
| 36 | '"Isn\'t this fun"? --- she said...', |
| 37 | '<p>“Isn’t this fun”? — she said…</p>' |
| 38 | ) |
| 39 | self.assertMarkdownRenders( |
| 40 | '"\'Quoted\' words in a larger quote."', |
| 41 | '<p>“‘Quoted’ words in a larger quote.”</p>' |
| 42 | ) |
| 43 | self.assertMarkdownRenders( |
| 44 | '\'Quoted "words" in a larger quote.\'', |
| 45 | '<p>‘Quoted “words” in a larger quote.’</p>' |
| 46 | ) |
| 47 | self.assertMarkdownRenders( |
| 48 | '"Quoted words at the \'end.\'"', |
| 49 | '<p>“Quoted words at the ‘end.’”</p>' |
| 50 | ) |
| 51 | self.assertMarkdownRenders( |
| 52 | '\'Quoted words at the "end."\'', |
| 53 | '<p>‘Quoted words at the “end.”’</p>' |
| 54 | ) |
| 55 | self.assertMarkdownRenders( |
| 56 | '(He replied, "She said \'Hello.\'")', |
| 57 | '<p>(He replied, “She said ‘Hello.’”)</p>' |
| 58 | ) |
| 59 | self.assertMarkdownRenders( |
| 60 | '<span>He replied, "She said \'Hello.\'"</span>', |
| 61 | '<p><span>He replied, “She said ‘Hello.’”</span></p>' |
| 62 | ) |
| 63 | self.assertMarkdownRenders( |
| 64 | '"quoted" text and **bold "quoted" text**', |
| 65 | '<p>“quoted” text and <strong>bold “quoted” text</strong></p>' |
| 66 | ) |
| 67 | self.assertMarkdownRenders( |
| 68 | "'quoted' text and **bold 'quoted' text**", |
| 69 | '<p>‘quoted’ text and <strong>bold ‘quoted’ text</strong></p>' |
| 70 | ) |
| 71 | self.assertMarkdownRenders( |
| 72 | 'em-dashes (---) and ellipes (...)', |
| 73 | '<p>em-dashes (—) and ellipes (…)</p>' |
| 74 | ) |
| 75 | self.assertMarkdownRenders( |
| 76 | '"[Link](http://example.com)" --- she said.', |
| 77 | '<p>“<a href="http://example.com">Link</a>” — she said.</p>' |
| 78 | ) |
| 79 | self.assertMarkdownRenders( |
| 80 | '"Ellipsis within quotes..."', |
| 81 | '<p>“Ellipsis within quotes…”</p>' |
| 82 | ) |
| 83 | self.assertMarkdownRenders( |
| 84 | "*Custer*'s Last Stand", |
| 85 | "<p><em>Custer</em>’s Last Stand</p>" |
| 86 | ) |
| 87 |
nothing calls this directly
no test coverage detected