Skip to content

Commit 609b5c2

Browse files
committed
Hotfix to correct error in processing of control serquences. (mathjax/MathJax#2538)
1 parent 0e98ab6 commit 609b5c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ts/input/tex/TexParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ export default class TexParser {
269269
* @return {string} Get and return a control-sequence name
270270
*/
271271
public GetCS(): string {
272-
let CS = this.string.slice(this.i).match(/^([a-z]+ ?|[\uD800-\uDBFF].|.)/i);
272+
let CS = this.string.slice(this.i).match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);
273273
if (CS) {
274274
this.i += CS[0].length;
275-
return CS[1];
275+
return CS[2] || CS[1];
276276
} else {
277277
this.i++;
278278
return ' ';

0 commit comments

Comments
 (0)