diff --git a/src/utils/expressionUtils.ts b/src/utils/expressionUtils.ts index cc688aa..956e422 100644 --- a/src/utils/expressionUtils.ts +++ b/src/utils/expressionUtils.ts @@ -4,13 +4,11 @@ * @returns The expression with the replaced operators */ export function replaceOperators(expression: string): string { - - expression = expression.replaceAll(/\//g, "|"); - expression = expression.replaceAll(/¬/g, "!"); - expression = expression.replaceAll(/\sOR\s/gi, " | "); - expression = expression.replaceAll(/\sAND\s/gi, " & "); - expression = expression.replaceAll(/\s(IMPLICATION|IMP)\s/gi, " -> "); - expression = expression.replaceAll(/\sNOT\s/gi, " !"); - - return expression; -} + return expression + .replaceAll(/\//g, "|") + .replaceAll(/¬/g, "!") + .replaceAll(/\sOR\s/gi, " | ") + .replaceAll(/\sAND\s/gi, " & ") + .replaceAll(/\s(IMPLICATION|IMP)\s/gi, " -> ") + .replaceAll(/\sNOT\s/gi, " !"); +} \ No newline at end of file