From b0338d06dcacbd7e98181e507670b8d157d5b51d Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 18 Sep 2019 18:59:46 -0400 Subject: [PATCH] Fix bug where newline() didn't consume. --- src/parse/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parse/parser.rs b/src/parse/parser.rs index 1b93496d62..681e8669e1 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -54,11 +54,11 @@ impl<'a> State<'a> { } /// Increments the line, then resets column, indent_col, and is_indenting. - /// This does *not* advance the input. + /// Advances the input by 1, to consume the newline character. pub fn newline(&self) -> Result { match self.line.checked_add(1) { Some(line) => Ok(State { - input: self.input, + input: &self.input[1..], line, column: 0, indent_col: 1,