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 /common/json-schema-to-grammar.cpp | |
parent | 396b18dfec2c56846e80362db70af09b9e1d70ba (diff) |
json: refine constraint for whitespace to avoid runaways yet allow pretty print (#7866)
Diffstat (limited to 'common/json-schema-to-grammar.cpp')
-rw-r--r-- | common/json-schema-to-grammar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/json-schema-to-grammar.cpp b/common/json-schema-to-grammar.cpp index 11221a32..10b9b3d1 100644 --- a/common/json-schema-to-grammar.cpp +++ b/common/json-schema-to-grammar.cpp @@ -40,7 +40,7 @@ static std::string build_repetition(const std::string & item_rule, int min_items return result; } -const std::string SPACE_RULE = "\" \"?"; +const std::string SPACE_RULE = "| \" \" | \"\\n\" [ \\t]{0,20}"; struct BuiltinRule { std::string content; |