Changed operators before sending to backend

This commit is contained in:
Martin Berg Alstad 2024-07-04 13:29:28 +02:00
parent fea9b8324d
commit 2376eadea9

View File

@ -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, " !")
}