GWicke has uploaded a new change for review.
https://gerrit.wikimedia.org/r/165968
Change subject: Strip margins too
......................................................................
Strip margins too
Change-Id: Ic243d2072b849217a42075426a91deb3fc6fa172
---
M mathoid-worker.js
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid
refs/changes/68/165968/1
diff --git a/mathoid-worker.js b/mathoid-worker.js
index 6f33763..b962e12 100644
--- a/mathoid-worker.js
+++ b/mathoid-worker.js
@@ -92,7 +92,11 @@
// Strip some styling returned by MathJax
if (data.svg) {
- data.svg =
data.svg.replace(/(style="[^"]*)(?:margin|position):[^;]+;/, '$1');
+ data.svg = data.svg.replace(/style="([^"]+)"/,
function(match, style) {
+ return 'style="'
+ +
style.replace(/(?:margin(?:-[a-z]+)?|position):[^;]+; */g, '')
+ + '"';
+ });
}
res.writeHead(200,
--
To view, visit https://gerrit.wikimedia.org/r/165968
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic243d2072b849217a42075426a91deb3fc6fa172
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mathoid
Gerrit-Branch: master
Gerrit-Owner: GWicke <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits