Exemplo n.º 1
0
        This has a <span>here</span>
        """
        expect = """
        <p>This has a <span>here</span></p>
        """
        self.assertMarkdown(text, expect)

    def testPreserveAttributes(self):
        text = """
        This has a <span id="AT&T>here</span>
        """
        expect = """
        <p>This has a <span id="AT&T>here</span></p>
        """
        self.assertMarkdown(text, expect)

    def testNewline(self):
        text = """
        This has a <span
        id="AT&T>here</span>
        """
        expect = """
        <p>This has a <span
        id="AT&T>here</span></p>
        """
        self.assertMarkdown(text, expect)


if __name__ == '__main__':
    main()
Exemplo n.º 2
0
            This is not a codeblock</li>
          </ul></li>
          <li><p>item 2</p>

        <pre><code>This is a codeblock</code></pre></li>
        </ul>
        """
        self.assertMarkdown(text, expect)

    def testBlockquoteInNestedList(self):
        text = """
        * item 1
            * item 1
                > This is a blockquote
        """
        expect = """
        <ul>
          <li><p>item 1</p>

          <ul>
            <li><p>item 1</p>

            <blockquote><p>This is a blockquote</p></blockquote></li>
          </ul></li>
        </ul>
        """
        self.assertMarkdown(text, expect)

if __name__ == '__main__':
    main()