mirror of
https://github.com/BigfootACA/arch-image-builder.git
synced 2024-09-21 15:20:53 +08:00
builder: lib: subscript.py: SubScript: fix dollar escape
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
This commit is contained in:
parent
e49f667db9
commit
11ee7f3517
@ -82,7 +82,8 @@ class SubScript:
|
|||||||
last = content.find("$", last)
|
last = content.find("$", last)
|
||||||
if last < 0: break
|
if last < 0: break
|
||||||
if content[last:last + 2] == "$$":
|
if content[last:last + 2] == "$$":
|
||||||
last += 2
|
content = content[:last] + content[last + 1:]
|
||||||
|
last += 1
|
||||||
continue
|
continue
|
||||||
if len(content) <= last + 2 or content[last + 1] != "{":
|
if len(content) <= last + 2 or content[last + 1] != "{":
|
||||||
raise ValueError(f"unexpected token in subscript at {lvl}")
|
raise ValueError(f"unexpected token in subscript at {lvl}")
|
||||||
|
Loading…
Reference in New Issue
Block a user