Beispiel #1
0
 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))
Beispiel #2
0
 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))
Beispiel #3
0
 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))
Beispiel #4
0
def process_strong(content):
    return md.MarkdownStrong(content)