Skip to content

Commit

Permalink
Merge pull request #799 from tweag/chris/fix/798-toml
Browse files Browse the repository at this point in the history
TOML: Hardline after table-less pairs
  • Loading branch information
nbacquey authored Dec 2, 2024
2 parents 0f4a5f1 + 23f2655 commit 7bda48e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ This name should be decided amongst the team before the release.

### Fixed
- [#779](https://github.com/tweag/topiary/pull/779) Load relevant grammars before CLI tests
- [#799](https://github.com/tweag/topiary/pull/799) Line break after table-less pairs in TOML

## v0.5.1 - Fragrant Frangipani - 2024-10-22

Expand Down
5 changes: 5 additions & 0 deletions topiary-cli/tests/samples/expected/toml.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Table-less pairs (#798)
foo = "bar"
baz = 'quux'
abc = 123

[package]

name = "topiary"
Expand Down
4 changes: 4 additions & 0 deletions topiary-cli/tests/samples/input/toml.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Table-less pairs (#798)
foo = "bar"
baz = 'quux'
abc = 123

[package]

Expand Down
4 changes: 4 additions & 0 deletions topiary-queries/queries/toml.scm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
(comment)
] @append_hardline

(document
(pair) @append_hardline
)

(table
(pair) @append_hardline
)
Expand Down

0 comments on commit 7bda48e

Please sign in to comment.