Skip to content

Inconsistent trailing space handling in wrap_preserving_code function #65

@coderabbitai

Description

@coderabbitai

The final flush operation in the wrap_preserving_code function trims trailing spaces using trim_end(), which is inconsistent with the earlier loop behavior that preserves trailing spaces.

Location: src/lib.rs around lines 319-322

Issue: The final flush still trims trailing spaces while the earlier change in the loop preserves them, creating inconsistent behavior within the same function.

Suggested fix: Replace the final flush logic to avoid trimming trailing spaces:

if !current.is_empty() {
    lines.push(current);
}

Context:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions