diff --git a/Makefile b/Makefile index f87939cb..e776c9bd 100644 --- a/Makefile +++ b/Makefile @@ -157,7 +157,7 @@ docs: doxygen: docs cp CONTRIBUTING.md docs/contributing.md cp CHANGELOG.md docs/changelog.md - cp docs/diagrams/*.svg docs/doxygen/html/ + cp docs/diagrams/plantuml/*.svg docs/doxygen/html/ mkdir -p docs/doxygen/html/test_cases cp docs/test_cases/*.svg docs/doxygen/html/test_cases/ ../doxygen/_build/bin/doxygen diff --git a/util/format_svg.py b/util/format_svg.py index 0b2f24f6..dd244066 100755 --- a/util/format_svg.py +++ b/util/format_svg.py @@ -36,6 +36,10 @@ def main(argv): # Parse SVG XML tree = etree.fromstring(bytes(xml, encoding='utf8')) + if not tree.attrib['width'] or tree.attrib['width'].endswith('%'): + # Make sure the width is equal to the viewBox width + tree.attrib['width'] = tree.attrib['viewBox'].split(' ')[2] + # Add style color for links defs = tree.xpath('//svg:defs', namespaces={'svg':'http://www.w3.org/2000/svg'}) if not defs: