mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
fix get_quoted_value
The previous version also stripped quotes that are part of the string
This commit is contained in:
parent
c993485782
commit
eb16ecf8b6
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user