Skip to content

Commit

Permalink
Fix bug in fixing image URLs, see #69
Browse files Browse the repository at this point in the history
  • Loading branch information
timvink committed Apr 19, 2022
1 parent 58b4b76 commit cc791a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mkdocs_print_site_plugin/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ def fix_image_src(page_html, page_url, directory_urls):
This is because flattening all pages into 1 print page will break any relative links.
"""
# Loop over all images src attributes
# Example regex https://regex101.com/r/TTRsVW/1
# Example regex https://regex101.com/r/PLUmZ7/2
img_regex = re.compile(
r"\<img.+src=\"([aA-zZ|0-9|\-|\_|\.|\:|\/]+)\"", flags=re.IGNORECASE
r"<img[^>]+src=\"([^\">]+)\"", flags=re.IGNORECASE
)
matches = re.finditer(img_regex, page_html)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="mkdocs-print-site-plugin",
version="2.3.2",
version="2.3.3",
description="MkDocs plugin that combines all pages into one, allowing for easy export to PDF and standalone HTML.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit cc791a5

Please sign in to comment.