From 5bc989831228a8e0e77bd0a239580d2c5ccb330c Mon Sep 17 00:00:00 2001 From: Ivor Caldwell Date: Sun, 25 Feb 2024 21:16:28 +0000 Subject: [PATCH] fix: multiple links in tag (#8) --- mkdocs_link_marker_plugin/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs_link_marker_plugin/plugin.py b/mkdocs_link_marker_plugin/plugin.py index f152cdb..a4c2240 100644 --- a/mkdocs_link_marker_plugin/plugin.py +++ b/mkdocs_link_marker_plugin/plugin.py @@ -20,11 +20,11 @@ def __init__(self): def on_page_content(self, html, page, config, files): if self.config['enable_external_link']: - p_external_link = re.compile('(.*)') + p_external_link = re.compile('(.*?)') html = p_external_link.sub('\\2 ' + self.config['icon_external_link'] + '', html) if self.config['enable_mail']: - p_mail = re.compile('(.*)') + p_mail = re.compile('(.*?)') html = p_mail.sub('\\2 ' + self.config['icon_mail'] + '', html) return html \ No newline at end of file