You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, in the context of pretty-format-toml I was recently surprised by the disappearance of a multi-paragraph comment. After investigation I discovered that it was interpreted by toml-sort as an orphan comment.
For example,
# paragraph 1# paragraph 2
[a-section]
and then # paragraph 1 vanishes.
I ended up solving this with
# paragraph 1## paragraph 2
[a-section]
Would it make sense to add an option which changes the behavior so that orphan comments are added to the next section rather than deleted?
The text was updated successfully, but these errors were encountered:
My apologies for the incorrect example, just tested this example (now updated to add some wanted & expected spacing):
[a-section]
# this comment is preservedconfig1 = 123# this orphaned part is removed# config2 = 456
[b-section]
config3 = 789# seems to be preserved at the end:# config4 = 901
Hi, in the context of pretty-format-toml I was recently surprised by the disappearance of a multi-paragraph comment. After investigation I discovered that it was interpreted by toml-sort as an orphan comment.
For example,
and then
# paragraph 1
vanishes.I ended up solving this with
Would it make sense to add an option which changes the behavior so that orphan comments are added to the next section rather than deleted?
The text was updated successfully, but these errors were encountered: