Skip to content

Commit

Permalink
Fixed CSS URL match pattern logic again
Browse files Browse the repository at this point in the history
  • Loading branch information
beveradb committed Mar 8, 2024
1 parent 4738872 commit bde251a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion logo_diagram_generator/generate_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def embed_logos_in_diagram(diagram_name, diagram_svg_path, output_svg_path, conf
css_url_search = re.findall(r"url\(#([^)]+)\)", logo_svg_content)
for css_url_match in css_url_search:
logging.debug(f"Adding {tool_name_slug}- prefix to CSS URL reference #{css_url_match}")
logo_svg_content = re.sub(r"url\(#([^)]+)\)", f"url(#{tool_name_slug}-{css_url_match})", logo_svg_content)
logo_svg_content = re.sub(f"url\(#{css_url_match}\)", f"url(#{tool_name_slug}-{css_url_match})", logo_svg_content)

logo_svg_dom = xml.dom.minidom.parseString(logo_svg_content)
logo_node = logo_svg_dom.documentElement
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "logo-diagram-generator"
version = "0.3.2"
version = "0.3.3"
description = "Generate SVG diagrams of a (tech) ecosystem, using logos from each tool organised into groups around a central logo"
authors = ["Andrew Beveridge <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit bde251a

Please sign in to comment.