mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 11:48:41 +00:00
Make unicodeAccents.js
ES6 module (#1477)
Use `babel-register` in `unicodeMake.js` to require ES6 module.
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
// Mapping of Unicode accent characters to their LaTeX equivalent in text and
|
||||
// math mode (when they exist).
|
||||
|
||||
// NOTE: This module needs to be written with Node-style modules (not
|
||||
// ES6 modules) so that unicodeMake.js (a Node application) can import it.
|
||||
module.exports = {
|
||||
export default {
|
||||
'\u0301': {text: "\\'", math: '\\acute'},
|
||||
'\u0300': {text: '\\`', math: '\\grave'},
|
||||
'\u0308': {text: '\\"', math: '\\ddot'},
|
||||
|
@@ -5,7 +5,8 @@
|
||||
// In this way, only this tool, and not the distribution/browser,
|
||||
// needs String's normalize function.
|
||||
|
||||
const accents = require('./unicodeAccents');
|
||||
require('babel-register')({plugins: ["transform-es2015-modules-commonjs"]});
|
||||
const accents = require('./unicodeAccents').default;
|
||||
|
||||
console.log("// @flow");
|
||||
console.log("// This file is GENERATED by unicodeMake.js. DO NOT MODIFY.");
|
||||
|
Reference in New Issue
Block a user