Skip to content

Commit

Permalink
Revert "grammars : don't allow to output unescaped new line in string (
Browse files Browse the repository at this point in the history
…#5885)"

This reverts commit b1a4e99.
  • Loading branch information
ggerganov committed Mar 5, 2024
1 parent b1a4e99 commit 82cb31e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grammars/json.gbnf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ array ::=

string ::=
"\"" (
[^"\\\n] |
[^"\\] |
"\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes
)* "\"" ws

Expand Down
2 changes: 1 addition & 1 deletion grammars/json_arr.gbnf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ array ::=

string ::=
"\"" (
[^"\\\n] |
[^"\\] |
"\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes
)* "\"" ws

Expand Down

0 comments on commit 82cb31e

Please sign in to comment.