Skip to content

Commit 0bb8e90

Browse files
committed
Fix typos and check for Windows names
1 parent a939e2d commit 0bb8e90

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

cjs/util/Tex.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ const Tex = exports.Tex = {
180180
const file = readdirSync(dir).find((name) => name.endsWith('Configuration.js'));
181181
promises.push(Util.import(`${dir}/${file}`));
182182
} else {
183-
Uti.error(`Unknown TeX package: ${name}`);
183+
Util.error(`Unknown TeX package: ${name}`);
184184
}
185185
}
186186
//

mjs/util/Tex.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export const Tex = {
176176
const file = readdirSync(dir).find((name) => name.endsWith('Configuration.js'));
177177
promises.push(Util.import(`${dir}/${file}`));
178178
} else {
179-
Uti.error(`Unknown TeX package: ${name}`);
179+
Util.error(`Unknown TeX package: ${name}`);
180180
}
181181
}
182182
//

mjs/util/Util.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@ export const Util = {
415415
* Import a file with error reporting.
416416
*/
417417
import(name) {
418+
if (name.match(/^[a-z]:[/\\]/)) {
419+
name = 'file://' + name;
420+
}
418421
return import(name).catch((err) => Util.fail(err.message));
419422
},
420423

0 commit comments

Comments
 (0)