aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2023-11-05 21:27:03 -0800
committerJohn MacFarlane <[email protected]>2023-11-05 21:27:03 -0800
commit76cd115d3bccc77df527b048ae7cad111e477d3d (patch)
tree6822dfd19ab4a6d9adb43992afba96b642cdb9fc /test
parent6fdebc4afd37227f6450f3c28ef7019c1f2e2be8 (diff)
Markdown reader: make attributes work with reference links.
Closes #9171.
Diffstat (limited to 'test')
-rw-r--r--test/command/9171.md65
1 files changed, 65 insertions, 0 deletions
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" , "" )
+ ]
+]
+
+```