diff --git a/compiler/parse/src/blankspace.rs b/compiler/parse/src/blankspace.rs index d5e7b5e785..b1a0e6f36b 100644 --- a/compiler/parse/src/blankspace.rs +++ b/compiler/parse/src/blankspace.rs @@ -291,7 +291,36 @@ fn eat_line_comment<'a>( comments_and_newlines.push(CommentOrNewline::DocComment("")); multiline = true; - return eat_spaces(state, multiline, comments_and_newlines); + + for c in state.bytes() { + match c { + b' ' => { + state = state.advance(1); + } + b'\n' => { + state = state.advance_newline(); + multiline = true; + comments_and_newlines.push(CommentOrNewline::Newline); + } + b'\r' => { + state = state.advance_newline(); + } + b'\t' => { + return HasTab(state); + } + b'#' => { + state = state.advance(1); + return eat_line_comment(state, multiline, comments_and_newlines); + } + _ => break, + } + } + + return Good { + state, + multiline, + comments_and_newlines, + }; } None => { // consume the second #