From: Juergen Spitzmueller Date: Thu, 15 Aug 2024 06:04:48 +0000 (+0200) Subject: fix get_quoted_value X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=eb16ecf8b616e1c1a1eccc1fab7f252906ff7c23;p=lyx.git fix get_quoted_value The previous version also stripped quotes that are part of the string --- 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}