diff --git a/Cargo.lock b/Cargo.lock index d95dbf3..0d54641 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -358,7 +358,7 @@ dependencies = [ [[package]] name = "snekdown" -version = "0.5.1" +version = "0.5.2" dependencies = [ "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 8f17312..b8dc0ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snekdown" -version = "0.5.1" +version = "0.5.2" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/src/parsing/parser.rs b/src/parsing/parser.rs index 8fc6419..2dd2bb8 100644 --- a/src/parsing/parser.rs +++ b/src/parsing/parser.rs @@ -549,7 +549,7 @@ impl Parser { if self.check_special(&META_CLOSE) { let _ = self.next_char(); } - if self.check_linebreak() || values.len() == 0 { + if values.len() == 0 { // if there was a linebreak (the metadata wasn't closed) or there is no inner data // return an error return Err(self.revert_with_error(start_index)); @@ -978,9 +978,6 @@ impl Parser { } if let Ok(url) = self.parse_url(true) { let metadata = if let Ok(meta) = self.parse_inline_metadata() { - if self.check_special(&META_CLOSE) && self.next_char() == None { - return Err(self.revert_with_error(start_index)); - } Some(meta) } else { None