Skip to content

fix(discover): preserve escaped line continuations - #3192

Open
nightcityblade wants to merge 1 commit into
rtk-ai:developfrom
nightcityblade:fix/issue-3190
Open

nightcityblade wants to merge 1 commit into
rtk-ai:developfrom
nightcityblade:fix/issue-3190

Conversation

@nightcityblade

Copy link
Copy Markdown

Summary

  • only collapse line continuations when the preceding backslash run has odd length
  • preserve literal backslash pairs and add regression coverage for even and odd runs

Fixes #3190

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk <command> output inspected

Manual checks confirmed that an escaped backslash keeps the newline command boundary, while a genuine line continuation still collapses.

Important: All PRs must target the develop branch (not master).
See CONTRIBUTING.md for details.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


nightcityblade seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@rtk-release-bot

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet.

@pszymkowiak

Copy link
Copy Markdown
Collaborator

Thanks for the contribution! Before we can review and merge this, the CLA needs to be signed. The CLAassistant bot left the link above, it only takes a minute. Once it's signed we'll pick the review up.

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.

collapse_line_continuations fuses commands when the backslash before a newline is escaped (\\<newline>)

3 participants