Thanks to visit codestin.com
Credit goes to github.com

Skip to content

String with escaping char dump error #437

@CXWorks

Description

@CXWorks

Hi,

Thanks for your time and patience. I'm not sure if it's bug in the lab or the inconsistency in my toml file, I need your help, thanks.

I'm using your library to parse Rust's project configuration file, Cargo.toml, in some projects, I will have following sections:

[target."cfg(all(target_arch = \"wasm32\", not(any(target_os = \"emscripten\", target_os = \"wasi\"))))".dependencies.wasm-bindgen]
version = "0.2"
optional = true

There are escaping symbols for the " chars, if I load the file into your library and dump the result, it will be like:

[target."cfg(all(target_arch = \\\"wasm32\\\", not(any(target_os = \\\"emscripten\\\", target_os = \\\"wasi\\\"))))".dependencies.wasm-bindgen]
version = "0.2"
optional = true

The extra \\ will be added for all the escaping locations, can you help me with this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions