Skip to content

fix: keep inline span text separated - #201

Closed
mayankdhingra02 wants to merge 1 commit into
yargs:masterfrom
mayankdhingra02:fix-span-boundary-spacing
Closed

mayankdhingra02 wants to merge 1 commit into
yargs:masterfrom
mayankdhingra02:fix-span-boundary-spacing

Conversation

@mayankdhingra02

Copy link
Copy Markdown

Closes #88.

When span text fills the space before the next row, the two pieces of
text currently run together, such as 1234567890[boolean]. Start a new
line when there is no room for a separating space, while preserving
empty spans and empty following rows.

Check the complete row before merging it into a span. This also handles
empty leading columns and avoids repeating the span prefix for each
column when wrapping is disabled.

Validation on Node 24: all 34 tests pass, including eight new boundary
and compatibility cases. The plain, ANSI and wide-text regressions fail
before the fix. npm run check and npm run coverage pass (100% lines
and statements, 97.4% branches).

Require a separating space when the next row has visible text. Decide
whether it fits after assembling the complete row, so empty leading
columns cannot hide the span before that check.

Preserve empty rows and spans, and append multi-column rows only once
when wrapping is disabled. Add plain, ANSI and wide-text regressions.

Closes yargs#88

Signed-off-by: Mayank Dhingra <mayankdhingra02@gmail.com>
@shadowspawn

Copy link
Copy Markdown
Member

Unsolicited Pull Requests may be closed without discussion.

For more see Contributing and AI Policy.

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.

Issue with Description Column not Rendering on Separate Line

2 participants