Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,26 +148,26 @@
"build-all": "build() { pnpm -s build-mjs $1; echo ; pnpm -s build-cjs $1; }; build"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@eslint/js": "^10.0.1",
"@xmldom/xmldom": "^0.9.10",
"copyfiles": "^2.4.1",
"diff": "^9.0.0",
"eslint": "^9.39.2",
"eslint": "^10.8.0",
"eslint-formatter-unix": "^9.0.1",
"eslint-plugin-jsdoc": "^62.5.5",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-jsdoc": "^63.3.3",
"eslint-plugin-prettier": "^5.5.6",
"husky": "^9.1.7",
"lint-staged": "^16.2.7",
"prettier": "^3.8.3",
"lint-staged": "^17.3.0",
"prettier": "^3.9.6",
"rimraf": "^6.1.3",
"string-replace-loader": "^3.3.0",
"terser-webpack-plugin": "^5.5.0",
"typedoc": "^0.28.19",
"terser-webpack-plugin": "^5.6.1",
"typedoc": "^0.28.20",
"typescript": "^5.9.3",
"typescript-eslint": "^8.56.0",
"typescript-eslint": "^8.66.0",
"typescript-tools": "^0.3.1",
"webpack": "^5.106.2",
"webpack-cli": "^7.0.2",
"webpack": "^5.109.2",
"webpack-cli": "^7.2.2",
"wicked-good-xpath": "^1.3.0",
"xslt3": "^2.7.0"
},
Expand Down
1,843 changes: 846 additions & 997 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions testsuite/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"#helpers": ["./js/src/index.js"]
},
"isolatedModules": true,
"skipLibCheck": true,
"lib": ["DOM", "es2022"]
},
"include": ["./tests/**/*.ts", "./src/*.ts"]
Expand Down
4 changes: 2 additions & 2 deletions ts/core/MmlTree/MmlNodes/mo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,16 +346,16 @@ export class MmlMo extends AbstractMmlTokenNode {
*/
public adjustTeXclass(prev: MmlNode): MmlNode {
const texClass = this.texClass;
let prevClass = this.prevClass;
if (texClass === TEXCLASS.NONE) {
return prev;
}
let prevClass;
if (prev) {
if (
prev.getProperty('autoOP') &&
(texClass === TEXCLASS.BIN || texClass === TEXCLASS.REL)
) {
prevClass = prev.texClass = TEXCLASS.ORD;
prev.texClass = TEXCLASS.ORD;
}
prevClass = this.prevClass = prev.texClass || TEXCLASS.ORD;
this.prevLevel = this.attributes.getInherited('scriptlevel') as number;
Expand Down
2 changes: 1 addition & 1 deletion ts/handlers/html/HTMLDomStrings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export class HTMLDomStrings<N, T, D> {
const cname = this.adaptor.getAttribute(node, 'class') || '';
const tname = this.adaptor.kind(node) || '';
const process = this.processHtmlClass.exec(cname);
let next = node as N | T;
let next;
if (
this.adaptor.firstChild(node) &&
!this.adaptor.getAttribute(node, 'data-MJX') &&
Expand Down
2 changes: 1 addition & 1 deletion ts/input/tex/ParseUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function readKeyval(text: string, l3keys: boolean = false): EnvList {
[key, end, rest] = readValue(rest, ['=', ','], l3keys, dropBrace);
dropBrace = false;
if (end === '=') {
[val, end, rest] = readValue(rest, [','], l3keys);
[val, , rest] = readValue(rest, [','], l3keys);
val = val === 'false' || val === 'true' ? JSON.parse(val) : val;
options[key] = val;
} else if (key) {
Expand Down
3 changes: 1 addition & 2 deletions ts/input/tex/ams/AmsItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export class MultlineItem extends ArrayItem {
super.EndTable();
if (this.table.length) {
const m = this.table.length - 1;
let label = -1;
if (
!NodeUtil.getAttribute(
NodeUtil.getChildren(this.table[0])[0],
Expand All @@ -120,7 +119,7 @@ export class MultlineItem extends ArrayItem {
}
const tag = this.factory.configuration.tags.getTag();
if (tag) {
label =
const label =
this.arraydef.side === TexConstant.Align.LEFT
? 0
: this.table.length - 1;
Expand Down
2 changes: 1 addition & 1 deletion ts/input/tex/newcommand/NewcommandMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ const NewcommandMethods: { [key: string]: ParseMethod } = {
args.push(parser.GetArgument(`\\begin{${name}}`));
}
bdef = ParseUtil.substituteArgs(parser, args, bdef);
edef = ParseUtil.substituteArgs(parser, [], edef); // no args, but get errors for #n in edef
ParseUtil.substituteArgs(parser, [], edef); // no args, but get errors for #n in edef
}
parser.string = ParseUtil.addArgs(
parser,
Expand Down
4 changes: 2 additions & 2 deletions ts/input/tex/newcommand/NewcommandUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ export const NewcommandUtil = {
*/
GetTemplate(parser: TexParser, cmd: string, cs: string): number | string[] {
// @test Def Double Let, Def ReDef, Def Let
let c = parser.GetNext();
parser.GetNext(); // Move past the first non-whitespace character.
const params: string[] = [];
let n = 0;
let i = parser.i;
while (parser.i < parser.string.length) {
c = parser.GetNext();
let c = parser.GetNext();
if (c === '#') {
// @test Def ReDef, Def Let, Def Optional Brace
if (i !== parser.i) {
Expand Down
19 changes: 8 additions & 11 deletions ts/input/tex/physics/PhysicsMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,11 @@ function vectorApplication(
if (!right) {
return;
}
let lfence = '',
rfence = '',
arg = '';
const enlarge = fences.includes(left);
if (left === '{') {
arg = parser.GetArgument(name);
lfence = enlarge ? '\\left\\{' : '';
rfence = enlarge ? '\\right\\}' : '';
const arg = parser.GetArgument(name);
const lfence = enlarge ? '\\left\\{' : '';
const rfence = enlarge ? '\\right\\}' : '';
const macro = `${lfence} ${arg} ${rfence}`;
parser.string = macro + parser.string.slice(parser.i);
parser.i = 0;
Expand Down Expand Up @@ -681,7 +678,7 @@ const PhysicsMethods: { [key: string]: ParseMethod } = {
parser.i = saveI;
}
}
let macro = '';
let macro;
if (hasKet) {
macro =
starBra || starKet
Expand Down Expand Up @@ -727,7 +724,7 @@ const PhysicsMethods: { [key: string]: ParseMethod } = {
if (parser.GetNext() === '{') {
ket = parser.GetArgument(name, true);
}
let macro = '';
let macro;
if (ket == null) {
macro = star
? `\\langle{${bra}}\\vert{${bra}}\\rangle`
Expand Down Expand Up @@ -755,7 +752,7 @@ const PhysicsMethods: { [key: string]: ParseMethod } = {
if (parser.GetNext() === '{') {
bra = parser.GetArgument(name, true);
}
let macro = '';
let macro;
if (bra == null) {
macro = star
? `\\vert{${ket}}\\rangle\\!\\langle{${ket}}\\vert`
Expand Down Expand Up @@ -928,7 +925,7 @@ const PhysicsMethods: { [key: string]: ParseMethod } = {
parser.i = 0;
return;
}
let matrix = '';
let matrix;
if (n === 1 && m === 1) {
// Case 1: n=m=1, no index.
matrix = arg1;
Expand Down Expand Up @@ -1010,7 +1007,7 @@ const PhysicsMethods: { [key: string]: ParseMethod } = {
const endI = parser.i;
parser.i = startI + 1;
const elements = [];
let element = '';
let element;
let currentI = parser.i;
while (currentI < endI) {
try {
Expand Down
3 changes: 2 additions & 1 deletion ts/output/common/Wrappers/mmultiscripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ export function CommonMmultiscriptsMixin<
*/
public getUVQ(subbox: BBox, supbox: BBox) {
if (!this.UVQ) {
let [u, v, q] = [0, 0, 0];
let u;
let [v, q] = [0, 0];
if (subbox.w === 0) {
//
// Use placement for superscript only
Expand Down
3 changes: 2 additions & 1 deletion ts/output/common/Wrappers/mo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ export function CommonMoMixin<
const hasWHD = WHD.length === 2 && WHD[0] + WHD[1] === HD;
const symmetric = this.node.attributes.get('symmetric');
const [H, D] = hasWHD ? WHD : [HD, 0];
let [h, d] = [H + D, 0];
let h = H + D;
let d;
if (symmetric) {
//
// Center on the math axis
Expand Down