aboutsummaryrefslogtreecommitdiffstats
path: root/tests/link_reference.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-30 12:25:48 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-30 12:25:48 +0200
commitb0bc9ea9b5f5bf8a5c2f33b1102abf4f649e60c7 (patch)
treefd3e89d8c94aa8be4acb4aaba6d76e4d2286b5fc /tests/link_reference.rs
parentcba6383758588068f696a50f0de614869f840614 (diff)
downloadmarkdown-rs-b0bc9ea9b5f5bf8a5c2f33b1102abf4f649e60c7.tar.gz
markdown-rs-b0bc9ea9b5f5bf8a5c2f33b1102abf4f649e60c7.tar.bz2
markdown-rs-b0bc9ea9b5f5bf8a5c2f33b1102abf4f649e60c7.zip
Fix to prefer resource when given
Diffstat (limited to '')
-rw-r--r--tests/link_reference.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/link_reference.rs b/tests/link_reference.rs
index cac1b39..0904995 100644
--- a/tests/link_reference.rs
+++ b/tests/link_reference.rs
@@ -256,12 +256,17 @@ fn link_reference() {
"should prefer collapsed references over shortcut references"
);
- // To do: some bug!
- // assert_eq!(
- // micromark("[foo]: /url1\n\n[foo]()"),
- // "<p><a href=\"\">foo</a></p>",
- // "should prefer resources over shortcut references"
- // );
+ assert_eq!(
+ micromark("[foo]: /url\n\n[foo]()"),
+ "<p><a href=\"\">foo</a></p>",
+ "should prefer resources over shortcut references (1)"
+ );
+
+ assert_eq!(
+ micromark("[foo]: /url \"title\"\n\n[foo]()"),
+ "<p><a href=\"\">foo</a></p>",
+ "should prefer resources over shortcut references (2)"
+ );
assert_eq!(
micromark("[foo]: /url1\n\n[foo](not a link)"),