chiark
/
gitweb
/
~cjwatson
/
blog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9a1c67
)
m.math: apply https://github.com/tuxu/latex2svg/pull/1.
author
Vladimír Vondruš
<mosra@centrum.cz>
Thu, 14 Sep 2017 22:03:02 +0000
(
00:03
+0200)
committer
Vladimír Vondruš
<mosra@centrum.cz>
Thu, 14 Sep 2017 22:11:11 +0000
(
00:11
+0200)
Fixes crashes in some corner cases.
pelican-plugins/m/latex2svg.py
patch
|
blob
|
history
diff --git
a/pelican-plugins/m/latex2svg.py
b/pelican-plugins/m/latex2svg.py
index 92e223bcfdc33e87bbac4b71b3474c12924d4ffc..f068f47e3f9ffdf3a854277da93d751bf1b57d74 100644
(file)
--- 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