def test_paragraphs_with_inline(self): expected_output = self.load_md("paragraphs_with_inline") para = md.MarkdownParagraph() para.add("Starting text ") para.add(md.MarkdownStrong("followed by strong text ")) para.add(md.MarkdownItalics("followed by italics ")) para.add("followed by normal text.") self.assertEqual(expected_output, str(para))
def test_basic_quote(self): expected_output = self.load_md("basic_quote") quotebox = md.MarkdownQuotebox() quotebox.add(md.MarkdownParagraph("The text of paragraph 1")) para = md.MarkdownParagraph() para.add("Some text before ") para.add(md.MarkdownStrong("the strong text")) quotebox.add(para) self.assertEqual(expected_output, str(quotebox))
def test_strong_with_whitespace(self): expected_output = self.load_md("strong_with_whitespace") strong = md.MarkdownStrong("Strong text ") self.assertEqual(expected_output, str(strong))
def process_strong(content): return md.MarkdownStrong(content)