Allow invalid TOML when parsing database settings (closes #1822)

This commit is contained in:
mdecimus 2025-07-16 16:53:15 +02:00
parent 7ae6ed12fb
commit 61d706f921

View file

@ -207,9 +207,9 @@ impl<'x, 'y> TomlParser<'x, 'y> {
return Err(format!("Empty key at line: {}", self.line));
}
}
'a'..='z' | '.' | 'A'..='Z' | '0'..='9' | '_' | '-' => {
/*'a'..='z' | '.' | 'A'..='Z' | '0'..='9' | '_' | '-' => {
key.push(ch);
}
}*/
'\"' => {
let mut last_ch = char::from(0);
while let Some(ch) = self.iter.next() {
@ -243,10 +243,7 @@ impl<'x, 'y> TomlParser<'x, 'y> {
}
}
_ => {
return Err(format!(
"Unexpected character {:?} found in key at line {}.",
ch, self.line
));
key.push(ch);
}
}
}