Fix nix-doc line ending handling #220

Open
opened 2024-04-03 21:33:25 +00:00 by lunaphied · 0 comments
Owner

While the logic to support all the valid Nix line endings (\n, \r, and \r\n) was added to the initial position finding code, the rest of the code was not updated which means this logic still will have oddities if someone has used non-standard Nix line endings.

This is not a priority as actual usage of these line endings in the wild is minimal to nonexistent but it should still be made correct.

The easiest fix would be to implement an extension to allow a nix_lines() split of an &str producing an interator that can be consumed by all the functions expecting lines.

While the logic to support all the valid Nix line endings (`\n`, `\r`, and `\r\n`) was added to the initial position finding code, the rest of the code was not updated which means this logic still will have oddities if someone has used non-standard Nix line endings. This is not a priority as actual usage of these line endings in the wild is minimal to nonexistent but it should still be made correct. The easiest fix would be to implement an extension to allow a `nix_lines()` split of an `&str` producing an interator that can be consumed by all the functions expecting lines.
lunaphied added the
bug
label 2024-04-03 21:33:25 +00:00
lunaphied self-assigned this 2024-04-03 21:33:25 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#220
No description provided.