We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5e5f65 commit d83571dCopy full SHA for d83571d
1 file changed
crate_universe/src/config.rs
@@ -729,10 +729,12 @@ where
729
let value: Option<serde_json::Value> = Option::deserialize(deserializer)?;
730
match value {
731
None | Some(serde_json::Value::Null) => Ok(None),
732
- Some(serde_json::Value::String(s)) => s
733
- .parse::<toml::Value>()
734
- .map(Some)
735
- .map_err(serde::de::Error::custom),
+ Some(serde_json::Value::String(s)) => {
+ let normalized = s.replace("\r\n", "\n");
+ toml::from_str::<toml::Value>(&normalized)
+ .map(Some)
736
+ .map_err(serde::de::Error::custom)
737
+ }
738
Some(other) => serde_json::from_value(other)
739
.map(Some)
740
.map_err(serde::de::Error::custom),
0 commit comments