Skip to content

Commit 13c0ad4

Browse files
authored
Merge pull request #1505 from mathjax/issue3575
Make sure multi-byte UTF8 characters are handled properly in data-latex attributes. (mathjax/MathJax#3575)
2 parents c9acda9 + 68caffc commit 13c0ad4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ts/input/tex/TexParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export default class TexParser {
151151
//
152152
// Back up one to pick up the parsed character (this.i is past it at this point).
153153
//
154-
this.saveI = this.i - (kind === 'character' && input[1] !== '&' ? 1 : 0);
154+
this.saveI = this.i - (kind === 'character' && input[1] !== '&' ? input[1].length : 0);
155155
const result = this.configuration.handlers.get(kind).parse(input);
156156
//
157157
// The macro gets processed by the \\ character later

0 commit comments

Comments
 (0)