mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 14:20:35 +01:00
[PR #1268] [MERGED] Respect line breaks in operator chains and argument lists #985
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/1268
Author: @bioball
Created: 10/29/2025
Status: ✅ Merged
Merged: 11/3/2025
Merged by: @bioball
Base:
main← Head:respect-line-breaks📝 Commits (1)
298126eRespect line breaks in operator chains and argument lists📊 Changes
6 files changed (+179 additions, -22 deletions)
View changed files
📝
docs/modules/release-notes/pages/0.30.adoc(+1 -1)📝
pkl-formatter/src/main/kotlin/org/pkl/formatter/Builder.kt(+47 -21)📝
pkl-formatter/src/test/files/FormatterSnippetTests/input/expr-chain-grouping.pkl(+3 -0)➕
pkl-formatter/src/test/files/FormatterSnippetTests/input/line-breaks3.pkl(+58 -0)📝
pkl-formatter/src/test/files/FormatterSnippetTests/output/expr-chain-grouping.pkl(+5 -0)➕
pkl-formatter/src/test/files/FormatterSnippetTests/output/line-breaks3.pkl(+65 -0)📄 Description
If an operator chain or method call is multiline, keep those newlines in the formatted output.
Help preserve code like:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.