예제 #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"])])
예제 #2
0
def test_example_489():
    result = publish("[foo [bar](/uri)](/uri)")
    assert_node(result, [
        nodes.document, nodes.paragraph,
        ("[foo ", [nodes.reference, "bar"], "](/uri)")
    ])
예제 #3
0
def test_example_492():
    result = publish("*[foo*](/uri)")
    assert_node(
        result,
        [nodes.document, nodes.paragraph, ("*", [nodes.reference, "foo*"])])
예제 #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")
예제 #5
0
def test_example_486():
    result = publish("[link \\[bar](/uri)")
    assert_node(
        result,
        [nodes.document, nodes.paragraph, nodes.reference, "link [bar"])
예제 #6
0
def test_example_478_2():
    result = publish(r"[link](<foo\>)")
    assert_node(result, [nodes.document, nodes.paragraph, "[link](<foo>)"])
예제 #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')
예제 #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"])
예제 #9
0
def test_example_115():
    text = ("```\n"
            "``` aaa\n"
            "```\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.literal_block, "``` aaa\n"])
예제 #10
0
def test_example_107():
    text = ("``` ```\n"
            "aaa\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, (nodes.literal,
                                                           "\naaa")])
예제 #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")])
예제 #12
0
def test_example_95():
    result = publish("```")
    assert_node(result, [nodes.document, nodes.literal_block])
예제 #13
0
def test_example_90():
    text = ("``\n"
            "foo\n"
            "``\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, nodes.literal, "foo"])
예제 #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"])
예제 #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 ""')
예제 #16
0
def test_example_14():
    result = publish("+++")
    assert_node(result, [nodes.document, nodes.paragraph, "+++"])
예제 #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')
예제 #18
0
def test_example_16():
    text = ("--\n"
            "**\n"
            "__\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, "--\n**\n__"])
예제 #19
0
def test_example_479():
    text = '[link](/url "title "and" title")'
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, text])
예제 #20
0
def test_example_172():
    result = publish("[foo]: /url")
    assert_node(result, [nodes.document, nodes.target])
예제 #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")
예제 #22
0
def test_example_174():
    result = publish('[foo]: /url "title" ok')
    assert_node(result, [nodes.document, nodes.paragraph, '[foo]: /url "title" ok'])
예제 #23
0
def test_example_484():
    result = publish("[link] bar](/uri)")
    assert_node(result, [nodes.document, nodes.paragraph, "[link] bar](/uri)"])
예제 #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'])])
예제 #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="")
예제 #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")
예제 #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)")
예제 #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")
예제 #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*")
예제 #30
0
def test_example_82():
    text = ("Foo\n"
            "    bar\n")
    result = publish(text)
    assert_node(result, [nodes.document, nodes.paragraph, "Foo\nbar"])