Change default delimiter

This commit is contained in:
KITAGAWA Yasutaka 2024-09-16 22:26:31 +09:00
parent 0a1413faa8
commit 5db79d9828
No known key found for this signature in database
GPG key ID: 8CC7638A056592C6

View file

@ -43,7 +43,7 @@ _navi_input | _navi_map_fn | _navi_nonewline"#
fn get_column(text: String, column: Option<u8>, delimiter: Option<&str>) -> String {
if let Some(c) = column {
let mut result = String::from("");
let re = regex::Regex::new(delimiter.unwrap_or(r"\s\s+")).expect("Invalid regex");
let re = regex::Regex::new(delimiter.unwrap_or(r"\s+")).expect("Invalid regex");
for line in text.split('\n') {
if (line).is_empty() {
continue;