Fix last table row being ignored on eof

feature/epub-rendering
trivernis 4 years ago
parent 621cd13279
commit bfaad4293a

2
Cargo.lock generated

@ -1117,7 +1117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "snekdown" name = "snekdown"
version = "0.22.7" version = "0.22.8"
dependencies = [ dependencies = [
"asciimath-rs 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "asciimath-rs 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",

@ -1,6 +1,6 @@
[package] [package]
name = "snekdown" name = "snekdown"
version = "0.22.7" version = "0.22.8"
authors = ["trivernis <trivernis@protonmail.com>"] authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018" edition = "2018"
license-file = "LICENSE" license-file = "LICENSE"

@ -116,7 +116,9 @@ impl ParseLine for Parser {
if self.ctm.check_char(&PIPE) { if self.ctm.check_char(&PIPE) {
self.ctm.seek_one()?; self.ctm.seek_one()?;
} }
self.ctm.seek_one()?; if !self.ctm.check_eof() {
let _ = self.ctm.seek_one();
}
if row.cells.len() > 0 { if row.cells.len() > 0 {
Ok(row) Ok(row)

Loading…
Cancel
Save