fixup! block: avoid panic on too short table line

This commit is contained in:
Noah Hellman 2023-02-01 19:36:46 +01:00
parent d2df3eb8a1
commit 3425ad4189

View file

@ -605,7 +605,7 @@ impl IdentifiedBlock {
'|' => {
// FIXME: last byte may be pipe but end of prefixed unicode char
((lt >= 2 && line.as_bytes()[lt - 1] == b'|')
&& ((lt >= 3) && line.as_bytes()[lt - 2] != b'\\'))
&& !((lt >= 3) && line.as_bytes()[lt - 2] == b'\\'))
.then(|| (Kind::Table { caption: false }, Span::empty_at(indent)))
}
'[' => chars.as_str().find("]:").map(|l| {