mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-09-20 10:35:10 +02:00
Let grammar escape backslashes (#5865)
This commit is contained in:
parent
907702c204
commit
818b4e0354
1 changed files with 2 additions and 0 deletions
|
@ -131,6 +131,8 @@ def parse_char(src):
|
||||||
return "\n", src[2:]
|
return "\n", src[2:]
|
||||||
elif esc == "t":
|
elif esc == "t":
|
||||||
return "\t", src[2:]
|
return "\t", src[2:]
|
||||||
|
elif esc == "\\":
|
||||||
|
return "\\", src[2:]
|
||||||
raise RuntimeError("unknown escape at " + src)
|
raise RuntimeError("unknown escape at " + src)
|
||||||
elif src:
|
elif src:
|
||||||
return src[0], src[1:]
|
return src[0], src[1:]
|
||||||
|
|
Loading…
Reference in a new issue