diff --git a/src/game.rs b/src/game.rs index aed95ba..87d111e 100644 --- a/src/game.rs +++ b/src/game.rs @@ -18,6 +18,14 @@ pub struct Game { impl From for Game { fn from(string: String) -> Game { + let mut string = format!("{}\n\n", string.trim()); + + if string.starts_with("# BITSY VERSION") { + string = format!("\n\n{}", string); + } + + let string = string; + // dialogues and endings can have 2+ line breaks inside, so deal with these separately // otherwise, everything can be split on a double line break (\n\n) let mut dialogues: Vec = Vec::new();