From 2376eadea9124524e8185aa05ee944cde0589568 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Thu, 4 Jul 2024 13:29:28 +0200 Subject: [PATCH] Changed operators before sending to backend --- src/utils/expressionUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/expressionUtils.ts b/src/utils/expressionUtils.ts index f897f38..3fa0567 100644 --- a/src/utils/expressionUtils.ts +++ b/src/utils/expressionUtils.ts @@ -7,8 +7,8 @@ export function replaceOperators(expression: string): string { return expression .replaceAll(/\//g, "|") .replaceAll(/¬/g, "!") - .replaceAll(/\sOR\s/gi, " | ") - .replaceAll(/\sAND\s/gi, " & ") + .replaceAll(/\s(OR|⋁)\s/gi, " | ") + .replaceAll(/\s(AND|⋀)\s/gi, " & ") .replaceAll(/\s(IMPLICATION|IMP|->)\s/gi, " => ") .replaceAll(/\sNOT\s/gi, " !") }