summaryrefslogtreecommitdiff
path: root/grammars/json.gbnf
diff options
context:
space:
mode:
authorOlivier Chafik <ochafik@users.noreply.github.com>2024-06-11 02:22:57 +0100
committerGitHub <noreply@github.com>2024-06-11 02:22:57 +0100
commitb61eb9644d64e90123ac805436d95b94b3b4cc3f (patch)
tree901482757f27f7430e945e41d4437927de946be6 /grammars/json.gbnf
parent396b18dfec2c56846e80362db70af09b9e1d70ba (diff)
json: refine constraint for whitespace to avoid runaways yet allow pretty print (#7866)
Diffstat (limited to 'grammars/json.gbnf')
-rw-r--r--grammars/json.gbnf2
1 files changed, 1 insertions, 1 deletions
diff --git a/grammars/json.gbnf b/grammars/json.gbnf
index 064a53f8..b6448c87 100644
--- a/grammars/json.gbnf
+++ b/grammars/json.gbnf
@@ -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}