mirror of
https://github.com/apple/pkl.git
synced 2026-03-20 16:23:57 +01:00
Apply pkl formatter to codebase (#1236)
This applies the Pkl formatter to `stdlib/` and `.circleci/`
This commit is contained in:
@@ -28,10 +28,7 @@ function escapeWithSingleQuotes(str: String): String =
|
||||
else if (acc.last.last != "'" && ch != "'")
|
||||
acc.replace(acc.lastIndex, acc.last.add(ch))
|
||||
else
|
||||
acc.add(List(ch)))
|
||||
let (grouped = str.chars.fold(List(), processChar))
|
||||
grouped
|
||||
.map((chSeq) ->
|
||||
if (chSeq == List("'")) #"\'"#
|
||||
else "'\(chSeq.join(""))'")
|
||||
.join("")
|
||||
acc.add(List(ch))
|
||||
)
|
||||
let (grouped = str.chars.fold(List(), processChar))
|
||||
grouped.map((chSeq) -> if (chSeq == List("'")) #"\'"# else "'\(chSeq.join(""))'").join("")
|
||||
|
||||
Reference in New Issue
Block a user