Skip to content

fix: emit_guarded no longer prints leading blank line when filtered is empty (fixes #4159) - #4295

Closed
TechWizard9999 wants to merge 9 commits into
rtk-ai:developfrom
TechWizard9999:fix/4159-emit-guarded-blank-line
Closed

TechWizard9999 wants to merge 9 commits into
rtk-ai:developfrom
TechWizard9999:fix/4159-emit-guarded-blank-line

Conversation

@TechWizard9999

Copy link
Copy Markdown
Contributor

Summary

Fixes #4159: was printing a stray leading blank line when the filtered body was empty and a tee hint followed.

Changes

  • : Only insert the newline separator between body and hint when the filtered body is non-empty
  • Added tests for the fix in module

Testing

  • All new tests pass
  • Existing tests should continue to pass

@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added bug Something isn't working output labels Sep 27, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Fixes a formatting bug in emit_guarded where an empty filtered body followed by a tee hint produced a stray leading blank line. The fix skips the newline separator when the filtered body is empty and adds unit tests covering the empty, non-empty, and no-hint cases.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #4159


Analyzed automatically by wshm · This is an automated analysis, not a human review.

@TechWizard9999

Copy link
Copy Markdown
Contributor Author

Closing as duplicate of #4166 (first, Sep 21 vs Sep 27). #4166 has the identical one-line fix with minimal diff (+14/-0). My 2 extra tests (empty/separator/no-hint) can be added to #4166 if the maintainer prefers fuller coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working output

Projects

None yet

Development

Successfully merging this pull request may close these issues.

emit_guarded prints a stray leading blank line when the filtered body is empty and a tee hint follows

1 participant