Fixed Mermaid SVG image width attribute
This commit is contained in:
2
Makefile
2
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
|
||||
|
||||
@@ -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 <a> links
|
||||
defs = tree.xpath('//svg:defs', namespaces={'svg':'http://www.w3.org/2000/svg'})
|
||||
if not defs:
|
||||
|
||||
Reference in New Issue
Block a user