Skip to content

fix(filter): preserve code around block comments#3086

Open
lntutor wants to merge 1 commit into
rtk-ai:developfrom
lntutor:fix/2714-inline-block-comments
Open

fix(filter): preserve code around block comments#3086
lntutor wants to merge 1 commit into
rtk-ai:developfrom
lntutor:fix/2714-inline-block-comments

Conversation

@lntutor

@lntutor lntutor commented Jul 20, 2026

Copy link
Copy Markdown

Summary

  • remove block-comment spans instead of dropping every line containing a comment marker
  • preserve code before and after same-line comments
  • preserve code before an opening comment and after a later closing delimiter
  • support multiple block-comment spans per line while retaining Rust doc blocks
  • trim only horizontal whitespace left at the end of stripped lines

Testing

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --all-features (2,498 passed, 8 ignored)

Closes #2714

@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.


Loi Nguyen 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.

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.

Bug: MinimalFilter drops code on lines with inline block comments (code loss)

2 participants