From 76cd115d3bccc77df527b048ae7cad111e477d3d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 5 Nov 2023 21:27:03 -0800 Subject: Markdown reader: make attributes work with reference links. Closes #9171. --- test/command/9171.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 test/command/9171.md (limited to 'test/command') diff --git a/test/command/9171.md b/test/command/9171.md new file mode 100644 index 000000000..ede24e320 --- /dev/null +++ b/test/command/9171.md @@ -0,0 +1,65 @@ +``` +% 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" , "" ) + ] +] + +``` -- cgit v1.2.3