mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Correctly update newline and indent state in multiline strings
This commit is contained in:
parent
a15998872d
commit
2dd4fe03f8
5 changed files with 70 additions and 1 deletions
|
@ -324,8 +324,10 @@ pub fn parse_str_like_literal<'a>() -> impl Parser<'a, StrLikeLiteral<'a>, EStri
|
|||
let without_newline = &state.bytes()[0..(segment_parsed_bytes - 1)];
|
||||
let with_newline = &state.bytes()[0..segment_parsed_bytes];
|
||||
|
||||
state.advance_mut(segment_parsed_bytes);
|
||||
state.advance_mut(segment_parsed_bytes - 1);
|
||||
state = state.advance_newline();
|
||||
state = consume_indent(state, indent)?;
|
||||
state = state.mark_current_indent();
|
||||
bytes = state.bytes().iter();
|
||||
|
||||
if state.bytes().starts_with(b"\"\"\"") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue