Skip to content

fix(cli): trailing whitespace after multiline text nodes in CST#5135

Merged
WillLillis merged 1 commit intorelease-0.26from
backport-5133-to-release-0.26
Dec 15, 2025
Merged

fix(cli): trailing whitespace after multiline text nodes in CST#5135
WillLillis merged 1 commit intorelease-0.26from
backport-5133-to-release-0.26

Conversation

@tree-sitter-ci-bot
Copy link

Description

Backport of #5133 to release-0.26.

Problem:
The CST printer emits trailing whitespace after multiline text nodes.
With 1704c60 and `:cst` corpus tests
this causes trailing spaces to appear on `test --update`.
These spaces cannot be removed afterward, as the test runner
expects an exact character-for-character match for CST tests.

Solution:
Print whitespace only if node is not multiline.

(cherry picked from commit 4ac2d5d)
@WillLillis WillLillis merged commit 25777e5 into release-0.26 Dec 15, 2025
19 checks passed
@WillLillis WillLillis deleted the backport-5133-to-release-0.26 branch December 15, 2025 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants