-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Construction of OutOfOrderTableProxy can cause newlines to be inserted #343
Comments
frostming
added a commit
that referenced
this issue
May 8, 2024
…serted Fixes #343 Signed-off-by: Frost Ming <me@frostming.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimal example for reproduction:
The value of dumps(doc) is:
The newline is added in tomlkit/container.py:187, when the [a.b.e] block is merged in with the [a.b.c.d] block. Setting the parsed flag in the container prior to the items being merged in seems to be a minimally invasive way to fix it, but I don't understand the nuance here to know if it's a good solution. I.e.
tomlkit/tomlkit/container.py
Lines 249 to 259 in 6351f3d
If this is an acceptable fix I'm happy to make a PR with the test and change, otherwise I'm happy to fix it in a different way or defer to someone with more knowledge of the library's inner workings haha.
The text was updated successfully, but these errors were encountered: