Increase allowed nesting level

Making it configurable would be complicated, so this just restores
the limit to close to the protobuf limit we were butting up against
for now.

Related: #3637
This commit is contained in:
Damien Elmes 2025-01-13 16:03:27 +11:00
parent 9a5c21739c
commit 39e293b27d

View file

@ -159,7 +159,7 @@ fn parse_text_with_clozes(text: &str) -> Vec<TextOrCloze<'_>> {
for token in tokenize(text) {
match token {
Token::OpenCloze(ordinal) => {
if open_clozes.len() < 3 {
if open_clozes.len() < 8 {
open_clozes.push(ExtractedCloze {
ordinal,
nodes: Vec::with_capacity(1), // common case