Allow invalid TOML when parsing database settings (closes #1822)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user