Fix last line of the file not being parsed

feature/epub-rendering
trivernis 4 years ago
parent c6e2a2560a
commit b835f900eb

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.21.2" version = "0.21.3"
dependencies = [ dependencies = [
"asciimath-rs 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "asciimath-rs 0.5.1 (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.21.2" version = "0.21.3"
authors = ["trivernis <trivernis@protonmail.com>"] authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018" edition = "2018"
license-file = "LICENSE" license-file = "LICENSE"

@ -12,7 +12,6 @@ body {
padding: 2rem; padding: 2rem;
margin: auto; margin: auto;
background-color: #FFF; background-color: #FFF;
box-shadow: 1em 1em 1em gray;
} }
h1 { h1 {

@ -154,9 +154,10 @@ impl ParseLine for Parser {
} }
if self.ctm.check_char(&LB) { if self.ctm.check_char(&LB) {
self.ctm.seek_one()?; if let Ok(_) = self.ctm.seek_one() {
if self.ctm.check_char(&LB) { if self.ctm.check_char(&LB) {
text.add_subtext(Inline::LineBreak) text.add_subtext(Inline::LineBreak)
}
} }
} }

Loading…
Cancel
Save