0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +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
mathParser.functions.sign = function (a) {
if(a == 0) return '';
if(a > 0) return '\\+';
return '\\-';
if(a >= 0) return '+';
return '-';
};
// Add signed function
mathParser.functions.signed = function (a) {
if(a >= 0) return `\\+${a}`;
return `\\${a}`;
if(a >= 0) return `+${a}`;
return `${a}`;
};
//Processes the markdown within an HTML block if it's just a class-wrapper