Skip to content

Commit

Permalink
another failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
benlubas committed Oct 10, 2024
1 parent e29cb48 commit 21d8aef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions server exited unexpectedly
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ptmux;_Gq=2,d=a,a=d\\
2 changes: 1 addition & 1 deletion src/stage_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub fn stage_1() -> impl Parser<char, Vec<NorgToken>, Error = chumsky::error::Si

let tag_end = one_of(SPECIAL_CHARS)
.then_ignore(keyword("end"))
.then_ignore(one_of("\n\r").rewind())
.then_ignore(choice((one_of("\n\r").rewind().map(|_| ()), end())))
.map(NorgToken::End);

choice((tag_end, escape, special, newlines, newline, ws, character))
Expand Down
5 changes: 4 additions & 1 deletion src/stage_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ fn tokens_to_paragraph_segment(tokens: Vec<NorgToken>) -> ParagraphTokenList {
Some(ParagraphSegmentToken::Text(result))
}
None => None,
_ => unreachable!(),
x => {
dbg!(x);
unreachable!();
}
})
.collect()
}
Expand Down

0 comments on commit 21d8aef

Please sign in to comment.