aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/deck.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deck.rs b/src/deck.rs
index 70dfda1..82566bd 100644
--- a/src/deck.rs
+++ b/src/deck.rs
@@ -39,7 +39,7 @@ pub fn read(deck: &str) -> Result<Vec<Entry>> {
message: "an entry should starts with “-”.".to_string(),
}));
} else {
- let without_minus = line.split('-').collect::<Vec<&str>>()[1].trim();
+ let without_minus = line.split('-').skip(1).collect::<Vec<&str>>().join("-");
let without_comment = without_minus.split('#').collect::<Vec<&str>>()[0].trim();
let translation = without_comment.split(':').collect::<Vec<&str>>();
if translation.len() != 2 {