mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-26 19:55:04 +00:00
json: refine constraint for whitespace to avoid runaways yet allow pretty print (#7866)
This commit is contained in:
@ -22,4 +22,4 @@ string ::=
|
||||
number ::= ("-"? ([0-9] | [1-9] [0-9]{0,15})) ("." [0-9]+)? ([eE] [-+]? [0-9] [1-9]{0,15})? ws
|
||||
|
||||
# Optional space: by convention, applied in this grammar after literal chars when allowed
|
||||
ws ::= [ \t\n]{0,20}
|
||||
ws ::= | " " | "\n" [ \t]{0,20}
|
||||
|
@ -31,4 +31,4 @@ string ::=
|
||||
number ::= ("-"? ([0-9] | [1-9] [0-9]{0,15})) ("." [0-9]+)? ([eE] [-+]? [1-9] [0-9]{0,15})? ws
|
||||
|
||||
# Optional space: by convention, applied in this grammar after literal chars when allowed
|
||||
ws ::= [ \t\n]{0,20}
|
||||
ws ::= | " " | "\n" [ \t]{0,20}
|
||||
|
Reference in New Issue
Block a user