Convert an table to inline table, the comment is preserved unexpectedly #30
Closed
Description
Suppose we have following toml:
[site.user]
name = "John" # Inline comment
age = 28
I want to convert site.user
to an inline table:
v = parsed['site']['user']
table = tomlkit.inline_table()
table.update(v)
print(table.as_string())
{age = 21,name = "John"# Inline comment}
What is weird is that even with:
table.update(dict(v))
The bug still exists.
The expected behavior should be dropping all comments of original table.
Metadata
Assignees
Labels
No labels