ITADN

Whitespace inside quoted values should not be trimmed

#140Closedzaneduffield 创建于 2024-11-08
Z
zaneduffieldcommented
I noticed that quoting a value isn't enough to preserve leading or trailing whitespace. This code unconditionally trims the value returned by the `parse_value` function https://github.com/zonyitoo/rust-ini/blob/b2a09b9e334053db70b3f39396169672d05ee88e/src/lib.rs#L1357 One of the reasons quoting is commonly supported in ini files is to allow explicit whitespace. - https://en.wikipedia.org/wiki/INI_file#Quoted_values I imagine the solution is to move the `trim` to inside of the `parse_value` and only call it when the value is unquoted.
关闭于 2024-12-20 4 条评论