fixup! a7f6782bc13246e3c6f17ab31d58876ba614bb3c

This commit is contained in:
Noah Hellman 2022-12-02 08:16:47 +01:00
parent 8ed3c0021a
commit 1c96e6f856
2 changed files with 8 additions and 2 deletions

View file

@ -123,8 +123,15 @@ impl<'s> Lexer<'s> {
let escape = self.escape;
let kind = match first {
_ if escape && first == ' ' => Nbsp,
_ if escape && first == '\n' => Hardbreak,
_ if escape
&& matches!(first, '\t' | ' ')
&& self.chars.clone().find(|c| !matches!(c, ' ' | '\t')) == Some('\n') =>
{
while self.eat() != Some('\n') {}
Hardbreak
}
_ if escape && first == ' ' => Nbsp,
_ if escape => Text,
'\\' => {

View file

@ -440,7 +440,6 @@ mod test {
"para0\n\npara1",
Start(Paragraph, Attributes::none()),
Str("para0"),
Atom(Softbreak),
End(Paragraph),
Atom(Blankline),
Start(Paragraph, Attributes::none()),