git.schokokeks.org
Repositories
Help
Report an Issue
fs-draft.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
784b48a
Branches
Tags
master
midgard
vorlage
fs-draft.git
tools
vorlage
erweiterungen
latex.js
schon vielversprechend
Christian Fraß
commited
784b48a
at 2018-08-21 21:40:56
latex.js
Blame
History
Raw
"use strict"; exports.__esModule = true; /** * @author kcf */ function escape_(wert) { return (wert .replace(new RegExp("\\\\", "g"), "\\\\") .replace(new RegExp("%", "g"), "\\%") .replace(new RegExp("&", "g"), "\\&")); } /** * @author kcf */ function habitus(modifikatoren) { if (!(modifikatoren .some(function (modifikator) { return ((modifikator.art === "escape") && (modifikator.angaben["ziel"] === "latex")); }))) { return modifikatoren.concat([{ "art": "escape", "angaben": { "ziel": "latex" } }]); } else { return modifikatoren; } } /** * @author kcf */ function definieren() { return { "name": "latex", "modifikatoren": { "escape": [ { "name": "latex", "funktion": function () { return function (wert) { return escape_(wert); }; } }, ] }, "habiti": [ { "name": "latex", "funktion": function (modifikatoren) { return habitus(modifikatoren); } }, ] }; } exports.definieren = definieren;