Still resolving rustdoc resolution panicking

This commit is contained in:
Kyle Lin 2023-07-01 00:55:37 +08:00
parent 46df95817d
commit 5ce6cc7df3
10 changed files with 90 additions and 80 deletions

View file

@ -410,8 +410,10 @@ fn parse_links<'md>(doc: &'md str) -> Vec<Box<str>> {
while let Some(event) = event_iter.next() {
match event {
Event::Start(Tag::Link(link_type, dest, _)) if may_be_doc_link(link_type) => {
if let Some(display_text) = collect_link_data(&mut event_iter) {
links.push(display_text);
if matches!(link_type, LinkType::Inline | LinkType::ReferenceUnknown | LinkType::Reference) {
if let Some(display_text) = collect_link_data(&mut event_iter) {
links.push(display_text);
}
}
links.push(preprocess_link(&dest));