Ignore carriage returns

This commit is contained in:
Richard Feldman 2020-06-16 22:52:00 -04:00
parent 3fc500cf1c
commit d5116d01b4

View file

@ -235,6 +235,10 @@ fn spaces<'a>(
// indentation yet, but maybe it will be after more spaces happen!
state = state.advance_spaces(1)?;
}
'\r' => {
// Ignore carriage returns.
state = state.advance_spaces(1)?;
}
'\n' => {
// No need to check indentation because we're about to reset it anyway.
state = state.newline()?;