From 3425ad418921d82de26b1876fb32102928e6d24b Mon Sep 17 00:00:00 2001 From: Noah Hellman Date: Wed, 1 Feb 2023 19:36:46 +0100 Subject: [PATCH] fixup! block: avoid panic on too short table line --- src/block.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/block.rs b/src/block.rs index 54c435d..1dd757d 100644 --- a/src/block.rs +++ b/src/block.rs @@ -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| {