diff options
author | pommicket <pommicket@gmail.com> | 2025-09-14 15:48:43 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-14 15:48:43 -0400 |
commit | 9d727e234ea29909092d0a07565f9c70651e74d6 (patch) | |
tree | 1bc52555af53ea2956c995a888a6cf34f1c6cf80 /src | |
parent | fff69a4da3a5b4f8edc11714fa61a25c8c9a9242 (diff) |
Strip line feeds from list entries
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -278,10 +278,10 @@ fn parse_list(string: &str) -> Vec<String> { let mut item = String::new(); let mut push = |item: &mut String, push_empty: bool| { let mut item = take(item); - while item.ends_with([' ', '\t']) { + while item.ends_with([' ', '\t', '\n']) { item.pop(); } - let leading_space_stripped = item.trim_start_matches([' ', '\t']); + let leading_space_stripped = item.trim_start_matches([' ', '\t', '\n']); if push_empty || !leading_space_stripped.is_empty() { list.push(if leading_space_stripped.len() == item.len() { item |