From: Vladimír Vondruš Date: Thu, 14 Sep 2017 22:03:02 +0000 (+0200) Subject: m.math: apply https://github.com/tuxu/latex2svg/pull/1. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=6f8391f1c6bfd1c96f291a235fc354db8a9918ff;p=blog.git m.math: apply https://github.com/tuxu/latex2svg/pull/1. Fixes crashes in some corner cases. --- diff --git a/pelican-plugins/m/latex2svg.py b/pelican-plugins/m/latex2svg.py index 92e223bc..f068f47e 100644 --- a/pelican-plugins/m/latex2svg.py +++ b/pelican-plugins/m/latex2svg.py @@ -131,7 +131,7 @@ def latex2svg(code, params=default_params, working_directory=None): return None, None def get_measure(output, name): - regex = r'\b%s=([0-9.]+)pt' % name + regex = r'\b%s=([0-9.e-]+)pt' % name match = re.search(regex, output) if match: return float(match.group(1)) / fontsize