From 6b53695be67bcdbca3b4e3677ea9909033440898 Mon Sep 17 00:00:00 2001 From: Matthias Endler Date: Thu, 7 Nov 2024 14:54:42 +0100 Subject: [PATCH] Support underscores in Markdown URLs (#1555) --- lychee-lib/src/extract/markdown.rs | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/lychee-lib/src/extract/markdown.rs b/lychee-lib/src/extract/markdown.rs index 4de6c2c6b2..ff0bfefb2b 100644 --- a/lychee-lib/src/extract/markdown.rs +++ b/lychee-lib/src/extract/markdown.rs @@ -1,7 +1,7 @@ //! Extract links and fragments from markdown documents use std::collections::{HashMap, HashSet}; -use pulldown_cmark::{CowStr, Event, LinkType, Options, Parser, Tag, TagEnd}; +use pulldown_cmark::{CowStr, Event, LinkType, Options, Parser, Tag, TagEnd, TextMergeStream}; use crate::{extract::plaintext::extract_raw_uri_from_plaintext, types::uri::raw::RawUri}; @@ -19,7 +19,7 @@ pub(crate) fn extract_markdown(input: &str, include_verbatim: bool) -> Vec