0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-04 16:52:38 +00:00

Remove escaping from new functions

This commit is contained in:
G.Ambatte
2024-08-03 10:32:39 +12:00
parent fcd5279381
commit 1b71bbaefb

View File

@@ -49,14 +49,13 @@ const mathParser = new MathParser({
}); });
// Add sign function // Add sign function
mathParser.functions.sign = function (a) { mathParser.functions.sign = function (a) {
if(a == 0) return ''; if(a >= 0) return '+';
if(a > 0) return '\\+'; return '-';
return '\\-';
}; };
// Add signed function // Add signed function
mathParser.functions.signed = function (a) { mathParser.functions.signed = function (a) {
if(a >= 0) return `\\+${a}`; if(a >= 0) return `+${a}`;
return `\\${a}`; return `${a}`;
}; };
//Processes the markdown within an HTML block if it's just a class-wrapper //Processes the markdown within an HTML block if it's just a class-wrapper