Example #1
0
def test_example_83():
    text = ("    foo\n"
            "bar\n")
    result = publish(text)
    assert_node(result, [nodes.document, ([nodes.literal_block, "foo\n"],
                                          [nodes.paragraph, "bar"])])
Example #2
0
def test_example_489():
    result = publish("[foo [bar](/uri)](/uri)")
    assert_node(result, [
        nodes.document, nodes.paragraph,
        ("[foo ", [nodes.reference, "bar"], "](/uri)")
    ])
Example #3
0
def test_example_492():
    result = publish("*[foo*](/uri)")
    assert_node(
        result,
        [nodes.document, nodes.paragraph, ("*", [nodes.reference, "foo*"])])
Example #4
0
def test_example_483():
    result = publish("[link [foo [bar]]](/uri)")
    assert_node(
        result,
        [nodes.document, nodes.paragraph, nodes.reference, "link [foo [bar]]"])
    assert_node(result[0][0], refuri="/uri")
Example #5
0
def test_example_486():
    result = publish("[link \\[bar](/uri)")
    assert_node(
        result,
        [nodes.document, nodes.paragraph, nodes.reference, "link [bar"])
Example #6
0
def test_example_478_2():
    result = publish(r"[link](<foo\>)")
    assert_node(result, [nodes.document, nodes.paragraph, "[link](<foo>)"])
Example #7
0
def test_example_480():
    result = publish("""[link](/url 'title "and" title')""")
    assert_node(result,
                [nodes.document, nodes.paragraph, nodes.reference, "link"])
    assert_node(result[0][0], refuri="/url", reftitle='title "and" title')
Example #8
0
def test_example_114_2():
    text = ("~~~ aa ``` ~~~\n"
            "foo\n"
            "~~~\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.literal_block, "foo\n"])
Example #9
0
def test_example_115():
    text = ("```\n"
            "``` aaa\n"
            "```\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.literal_block, "``` aaa\n"])
Example #10
0
def test_example_107():
    text = ("``` ```\n"
            "aaa\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, (nodes.literal,
                                                           "\naaa")])
Example #11
0
def test_example_114():
    text = ("``` aa ```\n"
            "foo\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, ([nodes.literal, "aa"],
                                                           "\nfoo")])
Example #12
0
def test_example_95():
    result = publish("```")
    assert_node(result, [nodes.document, nodes.literal_block])
Example #13
0
def test_example_90():
    text = ("``\n"
            "foo\n"
            "``\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, nodes.literal, "foo"])
Example #14
0
def test_example_7():
    result = publish("-\t\tfoo\n")
    assert_node(result, [nodes.document, nodes.bullet_list, nodes.list_item, nodes.literal_block, "  foo\n"])
Example #15
0
def test_example_477():
    result = publish("""[link](/url "title \\"&quot;")""")
    assert_node(result,
                [nodes.document, nodes.paragraph, nodes.reference, "link"])
    assert_node(result[0][0], refuri="/url", reftitle='title ""')
Example #16
0
def test_example_14():
    result = publish("+++")
    assert_node(result, [nodes.document, nodes.paragraph, "+++"])
Example #17
0
def test_example_478():
    result = publish("""[link](/url\xa0"title")""")
    assert_node(result,
                [nodes.document, nodes.paragraph, nodes.reference, "link"])
    assert_node(result[0][0], refuri='/url%C2%A0%22title%22')
Example #18
0
def test_example_16():
    text = ("--\n"
            "**\n"
            "__\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, "--\n**\n__"])
Example #19
0
def test_example_479():
    text = '[link](/url "title "and" title")'
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, text])
Example #20
0
def test_example_172():
    result = publish("[foo]: /url")
    assert_node(result, [nodes.document, nodes.target])
Example #21
0
def test_example_481():
    text = ('[link](   /uri\n' '  "title"  )\n')
    result = publish(text)
    assert_node(result,
                [nodes.document, nodes.paragraph, nodes.reference, "link"])
    assert_node(result[0][0], refuri="/uri", reftitle="title")
Example #22
0
def test_example_174():
    result = publish('[foo]: /url "title" ok')
    assert_node(result, [nodes.document, nodes.paragraph, '[foo]: /url "title" ok'])
Example #23
0
def test_example_484():
    result = publish("[link] bar](/uri)")
    assert_node(result, [nodes.document, nodes.paragraph, "[link] bar](/uri)"])
Example #24
0
def test_example_175():
    text = ('[foo]: /url\n'
            '"title" ok\n')
    result = publish(text)
    assert_node(result, [nodes.document, (nodes.target,
                                          [nodes.paragraph, '"title" ok'])])
Example #25
0
def test_example_461():
    result = publish("[link]()")
    assert_node(result,
                [nodes.document, nodes.paragraph, nodes.reference, "link"])
    assert_node(result[0][0], refuri="")
Example #26
0
def test_example_473():
    result = publish("[link](foo\\bar)")
    assert_node(result,
                [nodes.document, nodes.paragraph, nodes.reference, "link"])
    assert_node(result[0][0], refuri="foo%5Cbar")
Example #27
0
def test_example_491():
    result = publish("![[[foo](uri1)](uri2)](uri3)")
    assert_node(result, [nodes.document, nodes.paragraph, nodes.image])
    assert_node(result[0][0], uri="uri3", alt="[foo](uri2)")
Example #28
0
def test_example_474_2():
    result = publish("[link](<foo%20b&auml;>)")
    assert_node(result,
                [nodes.document, nodes.paragraph, nodes.reference, "link"])
    assert_node(result[0][0], refuri="foo%20b%C3%A4")
Example #29
0
def test_example_493():
    result = publish("[foo *bar](baz*)")
    assert_node(result,
                [nodes.document, nodes.paragraph, nodes.reference, "foo *bar"])
    assert_node(result[0][0], refuri="baz*")
Example #30
0
def test_example_82():
    text = ("Foo\n"
            "    bar\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, "Foo\nbar"])