inline: disallow '<' in autolinks

avoid hangs on long <<<<<< sequences
This commit is contained in:
Noah Hellman 2023-02-01 23:11:08 +01:00
parent 82adc631d9
commit 924d6c44ac

View file

@ -316,6 +316,9 @@ impl<I: Iterator<Item = char> + Clone> Parser<I> {
let mut is_url = false;
let len = (&mut ahead)
.take_while(|c| {
if *c == '<' {
return false;
}
if *c == '>' {
end = true;
};