chiark / gitweb /
doxygen: be more failproof for depth attribute returned from dvisvgm.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 9 Apr 2018 10:05:38 +0000 (12:05 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 9 Apr 2018 10:05:38 +0000 (12:05 +0200)
Sometimes the regex doesn't match and returns None, even though I tried
reaallyy hard to make it match. This fixes it for good.

doxygen/dox2html5.py

index e828764f66987c249ab9add8e2509997698581ba..9554388f78c0b942e5215fdcfae0fcc2e871c526 100755 (executable)
@@ -1134,7 +1134,7 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET.
                 # to 12pt font, scaled by 125% as set above in the config.
                 attribs = ' class="m-math{}" style="vertical-align: -{:.1f}pt;"'.format(
                     ' ' + add_inline_css_class if add_inline_css_class else '',
-                    rendered['depth']*12*1.25)
+                    (rendered['depth'] or 0.0)*12*1.25)
                 out.parsed += m.math._patch(i.text, rendered, attribs)
 
         # Inline elements