From eb16ecf8b616e1c1a1eccc1fab7f252906ff7c23 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 15 Aug 2024 08:04:48 +0200 Subject: [PATCH] fix get_quoted_value The previous version also stripped quotes that are part of the string --- lib/lyx2lyx/parser_tools.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/lyx2lyx/parser_tools.py b/lib/lyx2lyx/parser_tools.py index 20e60b3a6a..148938cdb3 100644 --- a/lib/lyx2lyx/parser_tools.py +++ b/lib/lyx2lyx/parser_tools.py @@ -430,7 +430,14 @@ def get_quoted_value(lines, token, start=0, end=0, default="", delete=False): val = get_value(lines, token, start, end, "", delete) if not val: return default - return val.strip('"') + # remove only outer pair of quotes, + # hence do not use strip('"') + if val[:1] == '"': + val = val[1:] + if val[-1:] == '"': + val = val[:-1] + + return val bool_values = {"true": True, "1": True, "false": False, "0": False} -- 2.39.5