From ddb122e3da514e6e3ce8f5d36f4cdeacbc29e87f Mon Sep 17 00:00:00 2001 From: Daniel Ramos Date: Tue, 1 Aug 2023 10:34:53 -0700 Subject: [PATCH] fix #561 --- .../piranha_playground/rule_inference/static_inference.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/experimental/piranha_playground/rule_inference/static_inference.py b/experimental/piranha_playground/rule_inference/static_inference.py index 4f44ae827..fe3dc13f9 100644 --- a/experimental/piranha_playground/rule_inference/static_inference.py +++ b/experimental/piranha_playground/rule_inference/static_inference.py @@ -173,9 +173,8 @@ def write_query(self, node: Node, depth=0, prefix="", simplify=False): # if the node is an identifier, add it to eq constraints if visited == 0: - self.query_ctrs.append( - f"(#eq? {node_name} \"{node.text.decode('utf8')}\")" - ) + text = node.text.decode("utf8").replace("\n", " ") + self.query_ctrs.append(f'(#eq? {node_name} "{text}")') s_exp += f")" self.capture_groups[node_name] = node