From b835f900eb3b40480ae4e141ba8f6940a7b5413f Mon Sep 17 00:00:00 2001 From: trivernis Date: Fri, 7 Aug 2020 16:28:37 +0200 Subject: [PATCH] Fix last line of the file not being parsed --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/format/assets/style.css | 1 - src/parser/line.rs | 7 ++++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8df620c..ad58059 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1117,7 +1117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "snekdown" -version = "0.21.2" +version = "0.21.3" dependencies = [ "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)", diff --git a/Cargo.toml b/Cargo.toml index c256548..41e7831 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snekdown" -version = "0.21.2" +version = "0.21.3" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/src/format/assets/style.css b/src/format/assets/style.css index 06ba210..a445a39 100644 --- a/src/format/assets/style.css +++ b/src/format/assets/style.css @@ -12,7 +12,6 @@ body { padding: 2rem; margin: auto; background-color: #FFF; - box-shadow: 1em 1em 1em gray; } h1 { diff --git a/src/parser/line.rs b/src/parser/line.rs index 95af386..3453d7c 100644 --- a/src/parser/line.rs +++ b/src/parser/line.rs @@ -154,9 +154,10 @@ impl ParseLine for Parser { } if self.ctm.check_char(&LB) { - self.ctm.seek_one()?; - if self.ctm.check_char(&LB) { - text.add_subtext(Inline::LineBreak) + if let Ok(_) = self.ctm.seek_one() { + if self.ctm.check_char(&LB) { + text.add_subtext(Inline::LineBreak) + } } }