-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Summary
--no-newline currently only has an effect for structured templates (JSON/YAML). In text/code modes the renderer always emits line-oriented output with a trailing newline, so the flag silently does nothing. The CLI help/README don’t mention this limitation, which can confuse users.
Steps to Reproduce
- Run
headson --no-newline -f text tests/fixtures/code/sample.py. - Observe that the output still ends with a newline and spans multiple lines.
Expected Behavior
Documentation (and ideally the CLI) should state that --no-newline only applies to structured formats. When the flag is used with text/code output, the tool should warn the user or explicitly ignore it.
Proposed Fix
- Update the README and
--helptext to note that--no-newlineis only honored for JSON/YAML-family templates. - Consider emitting a warning when
--no-newlineis combined with-f text,-f code, or--format autothat resolves to those modes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels