From 05b009a7c6c4dc28c1175bf3d46621c4696b2ab7 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 15 Mar 2022 13:29:14 -0700 Subject: [PATCH] Escape backslashes when stringifying. --- voussoirkit/expressionmatch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/voussoirkit/expressionmatch.py b/voussoirkit/expressionmatch.py index f5cb242..df5f6c0 100644 --- a/voussoirkit/expressionmatch.py +++ b/voussoirkit/expressionmatch.py @@ -94,6 +94,7 @@ class ExpressionTree: if self_token not in OPERATORS: t = self_token + t = t.replace('\\', '\\\\') t = t.replace('"', '\\"') t = t.replace('(', '\\(') t = t.replace(')', '\\)')