Skip to content

fix: use fmt.Sprintln for correct newline handling in Println#1619

Open
ManManavadaria wants to merge 1 commit intocharmbracelet:mainfrom
ManManavadaria:fix-Println
Open

fix: use fmt.Sprintln for correct newline handling in Println#1619
ManManavadaria wants to merge 1 commit intocharmbracelet:mainfrom
ManManavadaria:fix-Println

Conversation

@ManManavadaria
Copy link
Copy Markdown

Summary

Both the renderer and tea implement Println() that takes args and should behave like fmt.Println. The current implementation uses fmt.Sprint, which does not handle newlines correctly. This change switches to fmt.Sprintln so newlines are handled as expected.

Fixes #1613

  • I have read CONTRIBUTING.md.
  • I have created a discussion that was approved by a maintainer (for new features).

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.09%. Comparing base (ec39c45) to head (ba2a2bf).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
renderer.go 0.00% 1 Missing ⚠️
tea.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1619   +/-   ##
=======================================
  Coverage   56.09%   56.09%           
=======================================
  Files          25       25           
  Lines        1287     1287           
=======================================
  Hits          722      722           
  Misses        481      481           
  Partials       84       84           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ManManavadaria
Copy link
Copy Markdown
Author

Hi @aymanbagabas @meowgorithm

I noticed that the build-examples/build/govulncheck CI job in build.yml is failing with vulnerability GO-2025-3956.

This happens because it uses an older Go version that has a vulnerability in the standard library. I believe this will no longer appear once the Go version is updated.

The build failure in build-examples is an actual issue in the code, which I’ve already fixed in PR #1620 . I’d really appreciate it if you could review the PR and provide feedback

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.

[v2] tea.Println output gets overwritten by the new model's View() when switching models

1 participant