A section that is indented is parsed as key
affected version: `0.21.2`
not affected: `0.21.1`
This example has all lines beginning with spaces:
```
[SectionA]
Key1=Value1
[SectionB]
Key2=Value2
```
with version 0.21.1 it is correctly parsed (default parse options):
```
Ini {
sections: {
None: Properties {
data: {},
},
Some(
"SectionA",
): Properties {
data: {
"Key1": "Value1",
},
},
Some(
"SectionB",
): Properties {
data: {
"Key2": "Value2",
},
},
},
}
```
however with version 0.21.2, `[SectionB]` is parsed as part of the next key:
```
Ini {
sections: {
None: Properties {
data: {},
},
Some(
"SectionA",
): Properties {
data: {
"Key1": "Value1",
"[SectionB]\n Key2": "Value2",
},
},
},
}
```
关闭于 2025-08-25 1 条评论