From 13492c7fc4e99af7790feb21c116c9c502a40c19 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Wed, 29 Mar 2017 15:27:10 +0100 Subject: [PATCH] handle the \feynmandiagram command in code check pulled from our ace repository https://github.com/sharelatex/ace commit baeb9aff561d048b8a839683261ffdf149ecd4ef --- services/web/public/js/ace-1.2.5/worker-latex.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/public/js/ace-1.2.5/worker-latex.js b/services/web/public/js/ace-1.2.5/worker-latex.js index 3fa9bceb07..ccd7e2da9b 100644 --- a/services/web/public/js/ace-1.2.5/worker-latex.js +++ b/services/web/public/js/ace-1.2.5/worker-latex.js @@ -1931,7 +1931,7 @@ var InterpretTokens = function (TokeniseResult, ErrorReporter) { if (newPos === null) { continue; } else {i = newPos;}; } else if (seq === "hbox" || seq === "text" || seq === "mbox" || seq === "footnote" || seq === "intertext" || seq === "shortintertext" || seq === "textnormal" || seq === "tag" || seq === "reflectbox" || seq === "textrm") { nextGroupMathMode = false; - } else if (seq === "rotatebox" || seq === "scalebox") { + } else if (seq === "rotatebox" || seq === "scalebox" || seq == "feynmandiagram") { newPos = readOptionalGeneric(TokeniseResult, i); if (newPos === null) { /* do nothing */ } else {i = newPos;}; newPos = readDefinition(TokeniseResult, i); @@ -2179,7 +2179,7 @@ var EnvHandler = function (ErrorReporter) { this._beginMathMode = function (thisEnv) { var currentMathMode = this.getMathMode(); // undefined, null, $, $$, name of mathmode env if (currentMathMode) { - ErrorFrom(thisEnv, thisEnv.name + " used inside existing math mode " + getName(currentMathMode), + ErrorFrom(thisEnv, getName(thisEnv) + " used inside existing math mode " + getName(currentMathMode), {suppressIfEditing:true, errorAtStart: true, mathMode:true}); }; thisEnv.mathMode = thisEnv;