mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 01:09:22 +01:00
Let grammar escape backslashes (#5865)
This commit is contained in:
parent
907702c204
commit
818b4e0354
@ -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 New Issue
Block a user