mirror of
https://github.com/BigfootACA/arch-image-builder.git
synced 2024-09-21 10:40:54 +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
@ -81,8 +81,9 @@ class SubScript:
|
||||
while last < len(content):
|
||||
last = content.find("$", last)
|
||||
if last < 0: break
|
||||
if content[last:last+2] == "$$":
|
||||
last += 2
|
||||
if content[last:last + 2] == "$$":
|
||||
content = content[:last] + content[last + 1:]
|
||||
last += 1
|
||||
continue
|
||||
if len(content) <= last + 2 or content[last + 1] != "{":
|
||||
raise ValueError(f"unexpected token in subscript at {lvl}")
|
||||
|
Loading…
Reference in New Issue
Block a user