Skip to content

Commit

Permalink
Fix: When LaTeX array environment is used with @{} in column specifie…
Browse files Browse the repository at this point in the history
…rs browser hangs. (#2274)

* Replaced HTML/XML Numeric Character Reference like ⅈ with Unicode Escape Sequence like \u2148 for consistancy.

* reverted the change to utf8

* &neq; is invalid entity. Changed it to ≠

* prevChild null check added in getVListChildrenAndDepth funciton to prevent browser hanging
  • Loading branch information
theapu authored Jan 25, 2024
1 parent edb5983 commit 73ee59a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/core/v-box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ function getVListChildrenAndDepth(
if ('individualShift' in params) {
const oldChildren = params.individualShift;
let prevChild = oldChildren[0];
if (prevChild == null)
return [null, 0];

const children: (VBoxChild | VBoxElementAndShift)[] = [prevChild];

// Add in kerns to the list of params.children to get each element to be
Expand Down
2 changes: 1 addition & 1 deletion src/formats/atom-to-math-ml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ function scanOperator(stream: MathMLStream, final: number, options) {

const SPECIAL_OPERATORS = {
'\\ne': '≠',
'\\neq': '&neq;',
'\\neq': '≠',
'\\pm': '±',
'\\times': '×',
'\\colon': ':',
Expand Down

0 comments on commit 73ee59a

Please sign in to comment.