diff options
author | Olivier Chafik <ochafik@users.noreply.github.com> | 2024-06-11 02:22:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 02:22:57 +0100 |
commit | b61eb9644d64e90123ac805436d95b94b3b4cc3f (patch) | |
tree | 901482757f27f7430e945e41d4437927de946be6 /examples/server | |
parent | 396b18dfec2c56846e80362db70af09b9e1d70ba (diff) |
json: refine constraint for whitespace to avoid runaways yet allow pretty print (#7866)
Diffstat (limited to 'examples/server')
-rw-r--r-- | examples/server/public/json-schema-to-grammar.mjs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/server/public/json-schema-to-grammar.mjs b/examples/server/public/json-schema-to-grammar.mjs index dc246839..faed6a32 100644 --- a/examples/server/public/json-schema-to-grammar.mjs +++ b/examples/server/public/json-schema-to-grammar.mjs @@ -1,5 +1,5 @@ // WARNING: This file was ported from json_schema_to_grammar.py, please fix bugs / add features there first. -const SPACE_RULE = '" "?'; +const SPACE_RULE = '| " " | "\\n" [ \\t]{0,20}'; function _buildRepetition(itemRule, minItems, maxItems, opts={}) { if (minItems === 0 && maxItems === 1) { |