jenkins-bot has submitted this change and it was merged.
Change subject: LaTeXML literal workaround
......................................................................
LaTeXML literal workaround
There is an API-inconsistency between different versions
of the LaTeXML damon some versions require the literal
prefix other don't allow it.
Change-Id: Id92ef141c7921a82528b3ba4384e026322499312
---
M MathLaTeXML.php
1 file changed, 7 insertions(+), 2 deletions(-)
Approvals:
Physikerwelt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MathLaTeXML.php b/MathLaTeXML.php
index 3c31c4a..669513b 100644
--- a/MathLaTeXML.php
+++ b/MathLaTeXML.php
@@ -81,7 +81,7 @@
}
$texcmd = rawurlencode( $tex );
$settings = $this->serializeSettings(
$this->getLaTeXMLSettings() );
- $postData = $settings . '&tex=literal:' . $texcmd;
+ $postData = $settings . '&tex=' . $texcmd;
wfDebugLog( "Math", 'Get post data: ' . $postData );
return $postData;
}
@@ -101,6 +101,11 @@
$res = '';
$host = $this->pickHost();
$post = $this->getLaTeXMLPostData();
+ // There is an API-inconsistency between different versions of
the LaTeXML damon
+ // some versions require the literal prefix other don't allow
it.
+ if ( ! strpos( $host, '/convert' ) ){
+ $post = preg_replace( '/&tex=/' , '&tex=literal:',
$post , 1);
+ }
$this->lastError = '';
$requestResult = $this->makeRequest( $host, $post, $res,
$this->lastError );
if ( $requestResult ) {
@@ -176,4 +181,4 @@
protected function getMathTableName() {
return 'math_latexml';
}
-}
\ No newline at end of file
+}
--
To view, visit https://gerrit.wikimedia.org/r/115100
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id92ef141c7921a82528b3ba4384e026322499312
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: dev
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Deyan <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits