Make formatter stable (#1273)

This commit is contained in:
Islon Scherer
2025-10-31 18:58:22 +01:00
committed by GitHub
parent ea778a7e7a
commit 50541d9cda
3 changed files with 16 additions and 19 deletions
@@ -63,11 +63,10 @@ local function render(currentIndent: String) =
"\(currentIndent)@\(identifier.render(currentIndent))" +
if (body == null) "" else " " + body.render(currentIndent)
// FIXME: output is currently unstable
// items: List<Item> =
// allItems
// .filter((item) ->
// badItems.containsKey(item) // some line comment
// || item.tags.toList().findOrNull((it) -> it.type == "bookmark") != null // some other line comment
// )
// .sortBy((item) -> item.name)
items: List<Item> =
allItems
.filter((item) ->
badItems.containsKey(item) // some line comment
|| item.tags.toList().findOrNull((it) -> it.type == "bookmark") != null // some other line comment
)
.sortBy((item) -> item.name)
@@ -74,11 +74,10 @@ local function render(currentIndent: String) =
"\(currentIndent)@\(identifier.render(currentIndent))"
+ if (body == null) "" else " " + body.render(currentIndent)
// FIXME: output is currently unstable
// items: List<Item> =
// allItems
// .filter((item) ->
// badItems.containsKey(item) // some line comment
// || item.tags.toList().findOrNull((it) -> it.type == "bookmark") != null // some other line comment
// )
// .sortBy((item) -> item.name)
items: List<Item> =
allItems
.filter((item) ->
badItems.containsKey(item) // some line comment
|| item.tags.toList().findOrNull((it) -> it.type == "bookmark") != null // some other line comment
)
.sortBy((item) -> item.name)