Skip to content

Commit 5ce1a72

Browse files
authored
Merge pull request #1906 from dpvc/issue1819
Have \bigg and friends to trim spaces from their arguments. #1819
2 parents 7446453 + a4b6f41 commit 5ce1a72

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

unpacked/jax/input/TeX/jax.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,8 +2037,12 @@
20372037
while (this.nextIsSpace()) {this.i++}
20382038
var c = this.string.charAt(this.i); this.i++;
20392039
if (this.i <= this.string.length) {
2040-
if (c == "\\") {c += this.GetCS(name)}
2041-
else if (c === "{" && braceOK) {this.i--; c = this.GetArgument(name)}
2040+
if (c == "\\") {
2041+
c += this.GetCS(name);
2042+
} else if (c === "{" && braceOK) {
2043+
this.i--;
2044+
c = this.GetArgument(name).replace(/^\s+/,'').replace(/\s+$/,'');
2045+
}
20422046
if (TEXDEF.delimiter[c] != null) {return this.convertDelimiter(c)}
20432047
}
20442048
TEX.Error(["MissingOrUnrecognizedDelim",

0 commit comments

Comments
 (0)