Skip to content

Commit c5b61d4

Browse files
committed
Make sure we test only control sequences at the END of the parameter.
1 parent 83387dd commit c5b61d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unpacked/extensions/TeX/newcommand.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
259259
*/
260260
MatchParam: function (param) {
261261
if (this.string.substr(this.i,param.length) !== param) {return 0}
262-
if (param.match(/\\[a-z]+/i) &&
262+
if (param.match(/\\[a-z]+$/i) &&
263263
this.string.charAt(this.i+param.length).match(/[a-z]/i)) {return 0}
264264
this.i += param.length;
265265
return 1;

0 commit comments

Comments
 (0)