Files
2023-11-05 21:27:03 -08:00

1.3 KiB

% pandoc -f markdown -t native
[link][link contents]{target="_blank"}
[link2](https://example.com){target="_blank"}

[link contents]: https://example.com
^D
[ Para
    [ Link
        ( "" , [] , [ ( "target" , "_blank" ) ] )
        [ Str "link" ]
        ( "https://example.com" , "" )
    , SoftBreak
    , Link
        ( "" , [] , [ ( "target" , "_blank" ) ] )
        [ Str "link2" ]
        ( "https://example.com" , "" )
    ]
]

% pandoc -f markdown -t native
[link][link contents]{#id1 target="_blank"}
[link2](https://example.com){target="_blank"}

[link contents]: https://example.com {#id2 target="_nonblank"}
^D
[ Para
    [ Link
        ( "id1" , [] , [ ( "target" , "_blank" ) ] )
        [ Str "link" ]
        ( "https://example.com" , "" )
    , SoftBreak
    , Link
        ( "" , [] , [ ( "target" , "_blank" ) ] )
        [ Str "link2" ]
        ( "https://example.com" , "" )
    ]
]

% pandoc -f markdown -t native
[link][link contents]{target="_blank"}
[link2](https://example.com){target="_blank"}

[link contents]: https://example.com {.foo}
^D
[ Para
    [ Link
        ( "" , [ "foo" ] , [ ( "target" , "_blank" ) ] )
        [ Str "link" ]
        ( "https://example.com" , "" )
    , SoftBreak
    , Link
        ( "" , [] , [ ( "target" , "_blank" ) ] )
        [ Str "link2" ]
        ( "https://example.com" , "" )
    ]
]