inline: mv autolink url from span to event field

This commit is contained in:
Noah Hellman 2023-04-24 19:45:30 +02:00
parent 657b47df12
commit 0a144574f4
2 changed files with 17 additions and 20 deletions

View file

@ -820,14 +820,13 @@ impl<'s> Parser<'s> {
Container::Image(url_or_tag, ty)
}
}
inline::Container::Autolink => {
let url: CowStr = inline.span.of(self.src).into();
inline::Container::Autolink(url) => {
let ty = if url.contains('@') {
LinkType::Email
} else {
LinkType::AutoLink
};
Container::Link(url, ty)
Container::Link(url.into(), ty)
}
};
if enter {