Fixed regex typo

This commit is contained in:
Fabio Manganiello 2021-11-27 01:43:57 +01:00
parent 2914a74b75
commit 02b5ec1d38
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -35,7 +35,7 @@ class HttpWebpagePlugin(Plugin):
def _fix_relative_links(markdown: str, url: str) -> str:
url = urlparse(url)
base_url = f'{url.scheme}://{url.netloc}'
return re.sub(r'(!?\[.+?])\((/.+?)\)', f'\1({base_url}\2)', markdown)
return re.sub(r'(\[.+?])\((/.+?)\)', fr'\1({base_url}\2)', markdown)
# noinspection PyShadowingBuiltins
@action