diff --git a/src/app/browser/window/tab/item/page/content/text/markdown/tags/reference.rs b/src/app/browser/window/tab/item/page/content/text/markdown/tags/reference.rs index 9019e22f..5ee0eaaa 100644 --- a/src/app/browser/window/tab/item/page/content/text/markdown/tags/reference.rs +++ b/src/app/browser/window/tab/item/page/content/text/markdown/tags/reference.rs @@ -7,10 +7,10 @@ use gtk::{ use regex::Regex; use std::collections::HashMap; -const REGEX_LINK: &str = r"\[(?P[^\]]+)\]\((?P[^\)]+)\)"; -const REGEX_IMAGE: &str = r"!\[(?P[^\]]+)\]\((?P[^\)]+)\)"; +const REGEX_LINK: &str = r"\[(?P[^\]]*)\]\((?P[^\)]+)\)"; +const REGEX_IMAGE: &str = r"!\[(?P[^\]]*)\]\((?P[^\)]+)\)"; const REGEX_IMAGE_LINK: &str = - r"\[(?P!)\[(?P[^\]]+)\]\((?P[^\)]+)\)\]\((?P[^\)]+)\)"; + r"\[(?P!)\[(?P[^\]]*)\]\((?P[^\)]+)\)\]\((?P[^\)]+)\)"; struct Reference { uri: Uri,