mirror of
https://github.com/apple/pkl.git
synced 2026-04-20 15:31:28 +02:00
Fix formatting of nodes with no children (#1351)
For example, this fixes an issue where an empty module turns into ` \n`. Closes https://github.com/apple/pkl/issues/1348 --------- Co-authored-by: Jen Basch <jbasch94@gmail.com>
This commit is contained in:
@@ -113,4 +113,11 @@ class FormatterTest {
|
||||
|
||||
walkDir(outputDir)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `whitespace only`() {
|
||||
for (src in listOf(";;;", "\n", "\n\n\n", "\t")) {
|
||||
assertThat(format(src)).isEqualTo("\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user