lib: fix url in autolink/email end event
was constant ">" instead of actual url
This commit is contained in:
parent
3c17d6df49
commit
d2d7f5d474
2 changed files with 36 additions and 5 deletions
30
src/lib.rs
30
src/lib.rs
|
@ -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!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue