lib: fix url in autolink/email end event

was constant ">" instead of actual url
This commit is contained in:
Noah Hellman 2023-04-10 18:09:42 +02:00
parent 3c17d6df49
commit d2d7f5d474
2 changed files with 36 additions and 5 deletions

View file

@ -1540,6 +1540,36 @@ mod test {
);
}
#[test]
fn autolink() {
test_parse!(
"<proto:url>\n",
Start(Paragraph, Attributes::new()),
Start(
Link("proto:url".into(), LinkType::AutoLink),
Attributes::new()
),
Str("proto:url".into()),
End(Link("proto:url".into(), LinkType::AutoLink)),
End(Paragraph),
);
}
#[test]
fn email() {
test_parse!(
"<name@domain>\n",
Start(Paragraph, Attributes::new()),
Start(
Link("name@domain".into(), LinkType::Email),
Attributes::new()
),
Str("name@domain".into()),
End(Link("name@domain".into(), LinkType::Email)),
End(Paragraph),
);
}
#[test]
fn footnote_references() {
test_parse!(