{"size": 1251, "ext": "js", "max_stars_repo_path": "packages/autocomplete-latex-cite/node_modules/latex-to-unicode-converter/ts-compiled/convert.js", "max_stars_repo_name": "fabiofortkamp/fatomrc", "max_stars_repo_stars_event_min_datetime": "2018-12-13T07:11:00.000Z", "max_stars_repo_stars_event_max_datetime": "2018-12-13T07:11:00.000Z", "max_issues_repo_path": "packages/autocomplete-latex-cite/node_modules/latex-to-unicode-converter/ts-compiled/convert.js", "max_issues_repo_name": "fabiofortkamp/fatomrc", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/autocomplete-latex-cite/node_modules/latex-to-unicode-converter/ts-compiled/convert.js", "max_forks_repo_name": "fabiofortkamp/fatomrc", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 40.3548387097, "max_line_length": 144, "alphanum_fraction": 0.7058353317}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var options_1 = require("./options");
var latex_parser_1 = require("latex-parser");
var convert_1 = require("./unicode/convert");
function convertLaTeX(options, src) {
    return convertLaTeXBlocks(options, latex_parser_1.mustNotBeUndefined(latex_parser_1.mustBeOk(latex_parser_1.latexParser.parse(src)).value));
}
exports.convertLaTeX = convertLaTeX;
function convertLaTeXToUnicode(src) {
    return convertLaTeXBlocks({
        translateTo: "unicode",
        mode: "Any",
    }, latex_parser_1.mustNotBeUndefined(latex_parser_1.mustBeOk(latex_parser_1.latexParser.parse(src)).value));
}
exports.convertLaTeXToUnicode = convertLaTeXToUnicode;
function convertLaTeXBlocks(options, latex) {
    var translateTo = options.translateTo;
    switch (translateTo) {
        case "html":
            throw new Error("Unsupported format: '"
                + translateTo
                + "'. Use one of: "
                + Object.keys(options_1.supportedMarkups));
        case "unicode":
        default:
            return convert_1.convertLaTeXBlocksToUnicode(options, latex).result;
    }
}
exports.convertLaTeXBlocks = convertLaTeXBlocks;
//# sourceMappingURL=convert.js.map