We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 680c6b1 commit 27642a2Copy full SHA for 27642a2
src/parser/mod.rs
@@ -1595,7 +1595,7 @@ where
1595
}
1596
1597
for (lab, rr) in rrs_to_add {
1598
- self.refmap.map.insert(lab, rr);
+ self.refmap.map.entry(lab).or_insert(rr);
1599
1600
1601
if seeked != 0 {
src/tests/core.rs
@@ -945,3 +945,11 @@ fn ipv6_host_unescaped() {
945
"<p><a href=\"https://[2402:1f00:89aa:300::5%25eth0]:9443?target=%3Cyes%3E\">henwo</a></p>\n",
946
);
947
948
+
949
+#[test]
950
+fn link_ref_definition_priority() {
951
+ html(
952
+ "[foo]\n\n[foo]: first\n[foo]: second\n",
953
+ "<p><a href=\"first\">foo</a></p>\n",
954
+ );
955
+}
0 commit comments