Fix import parsing

pull/1/head
trivernis 4 years ago
parent d43410de70
commit 5efb355a06

2
Cargo.lock generated

@ -153,7 +153,7 @@ dependencies = [
[[package]]
name = "snekdown"
version = "0.1.1"
version = "0.1.2"
dependencies = [
"crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"htmlescape 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",

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

@ -478,7 +478,10 @@ impl Parser {
if self.check_linebreak() || path.is_empty() {
return Err(self.revert_with_error(start_index));
}
parse_option!(self.next_char(), self.index);
if self.check_special(&IMPORT_CLOSE) {
parse_option!(self.next_char(), self.index);
}
self.seek_whitespace();
if let Ok(anchor) = self.import_document(path.clone()) {
Ok(Import { path, anchor })

Loading…
Cancel
Save