Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d02a9cf

Browse filesBrowse files
committed
Fixed json strings grammar by blacklisting character control set. Closes abetlen#1259
1 parent 1f3156d commit d02a9cf
Copy full SHA for d02a9cf

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎llama_cpp/llama_grammar.py

Copy file name to clipboardExpand all lines: llama_cpp/llama_grammar.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ def print_grammar(file: TextIO, state: parse_state) -> None:
13371337
13381338
string ::=
13391339
"\"" (
1340-
[^"\\] |
1340+
[^"\\\x7F\x00-\x1F] |
13411341
"\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes
13421342
)* "\"" ws
13431343
@@ -1366,7 +1366,7 @@ def print_grammar(file: TextIO, state: parse_state) -> None:
13661366
13671367
string ::=
13681368
"\"" (
1369-
[^"\\] |
1369+
[^"\\\x7F\x00-\x1F] |
13701370
"\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes
13711371
)* "\"" ws
13721372

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.