site/node_modules/mathjax-full/js/input/tex/newcommand/NewcommandConfiguration.js

59 lines
2.7 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NewcommandConfiguration = void 0;
var Configuration_js_1 = require("../Configuration.js");
var NewcommandItems_js_1 = require("./NewcommandItems.js");
var NewcommandUtil_js_1 = __importDefault(require("./NewcommandUtil.js"));
require("./NewcommandMappings.js");
var ParseMethods_js_1 = __importDefault(require("../ParseMethods.js"));
var sm = __importStar(require("../SymbolMap.js"));
var init = function (config) {
new sm.DelimiterMap(NewcommandUtil_js_1.default.NEW_DELIMITER, ParseMethods_js_1.default.delimiter, {});
new sm.CommandMap(NewcommandUtil_js_1.default.NEW_COMMAND, {}, {});
new sm.EnvironmentMap(NewcommandUtil_js_1.default.NEW_ENVIRONMENT, ParseMethods_js_1.default.environment, {}, {});
config.append(Configuration_js_1.Configuration.local({ handler: { character: [],
delimiter: [NewcommandUtil_js_1.default.NEW_DELIMITER],
macro: [NewcommandUtil_js_1.default.NEW_DELIMITER,
NewcommandUtil_js_1.default.NEW_COMMAND],
environment: [NewcommandUtil_js_1.default.NEW_ENVIRONMENT]
},
priority: -1 }));
};
exports.NewcommandConfiguration = Configuration_js_1.Configuration.create('newcommand', {
handler: {
macro: ['Newcommand-macros']
},
items: (_a = {},
_a[NewcommandItems_js_1.BeginEnvItem.prototype.kind] = NewcommandItems_js_1.BeginEnvItem,
_a),
options: { maxMacros: 1000 },
init: init
});
//# sourceMappingURL=NewcommandConfiguration.js.map