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

Table header missing #374

Closed
CGamesPlay opened this issue Jul 30, 2024 · 0 comments · Fixed by #375
Closed

Table header missing #374

CGamesPlay opened this issue Jul 30, 2024 · 0 comments · Fixed by #375
Assignees

Comments

@CGamesPlay
Copy link

>>> import tomlkit
>>> child = tomlkit.table()
>>> child.add(tomlkit.key(("b", "c")), 1)
{'b': {'c': 1}}
>>> tbl = tomlkit.table()
>>> tbl.add("a", child)
{'a': {'b': {'c': 1}}}
>>> tbl.as_string()
'b.c = 1\n'
>>> child.is_super_table()
True

Here the "a" level has been dropped, because child was classified as a super table. Using child = tomlkit.table(False) has the correct behavior.

@frostming frostming self-assigned this Aug 2, 2024
frostming added a commit that referenced this issue Aug 2, 2024
Fixes #374

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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants