Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String with escaping char dump error #437

Open
CXWorks opened this issue Dec 12, 2023 · 0 comments
Open

String with escaping char dump error #437

CXWorks opened this issue Dec 12, 2023 · 0 comments

Comments

@CXWorks
Copy link

CXWorks commented Dec 12, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant