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:
The final flush operation in the
wrap_preserving_codefunction trims trailing spaces usingtrim_end(), which is inconsistent with the earlier loop behavior that preserves trailing spaces.Location:
src/lib.rsaround lines 319-322Issue: 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:
Context: