Skip to content

feat: add RenderOptions render entry points and support CRLF line endings - #18

Merged
QuadnucYard merged 2 commits into
mainfrom
line-endings
Oct 1, 2026
Merged

QuadnucYard merged 2 commits into
mainfrom
line-endings

Conversation

@QuadnucYard

Copy link
Copy Markdown
Contributor

There was no place to put rendering configuration beyond width, so
each new control would need its own method family. Existing render,
render_fmt, render_raw, and print keep their signatures and
delegate with RenderOptions::new(width); output is unchanged.

The terminator was hardcoded to "\n", so callers emitting CRLF had to
post-process the whole output, which also rewrites newlines embedded
in text payloads. LineEnding now selects the terminator for
structural breaks only; embedded text newlines pass through verbatim,
and terminator length never affects fitting or column accounting.
LF stays the default on every platform, with no system detection.

There was no place to put rendering configuration beyond `width`, so
each new control would need its own method family. Existing `render`,
`render_fmt`, `render_raw`, and `print` keep their signatures and
delegate with `RenderOptions::new(width)`; output is unchanged.
The terminator was hardcoded to "\n", so callers emitting CRLF had to
post-process the whole output, which also rewrites newlines embedded
in text payloads. `LineEnding` now selects the terminator for
structural breaks only; embedded text newlines pass through verbatim,
and terminator length never affects fitting or column accounting.
LF stays the default on every platform, with no system detection.
@QuadnucYard
QuadnucYard merged commit 4061a72 into main Oct 1, 2026
2 checks passed
@QuadnucYard
QuadnucYard deleted the line-endings branch October 1, 2026 07:18
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.

1 participant