diff --git a/Cargo.lock b/Cargo.lock index fb36dd5..6b77782 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -566,7 +566,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "snekdown" -version = "0.15.1" +version = "0.15.2" dependencies = [ "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "colored 1.9.3 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 900e5eb..f335ef2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snekdown" -version = "0.15.1" +version = "0.15.2" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/README.md b/README.md index fa1423c..9fa4831 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ Bibliography entries can be defined and referenced anywhere in the document. Definition: ```md -[book]:[author=Snek title = "Snekdown Book"] +[book]:[author=Snek, title = "Snekdown Book"] [github]: https://github.com/trivernis/snekdown ``` diff --git a/src/parsing/parser.rs b/src/parsing/parser.rs index ab2ee71..6a62d74 100644 --- a/src/parsing/parser.rs +++ b/src/parsing/parser.rs @@ -454,6 +454,10 @@ impl Parser { if self.check_special_group("ES) { self.skip_char(); } + self.seek_inline_whitespace(); + if self.check_special(&COMMA) { + self.skip_char(); + } value = if quoted_string { MetadataValue::String(raw_value) } else if raw_value.to_lowercase().as_str() == "true" { diff --git a/src/parsing/tokens.rs b/src/parsing/tokens.rs index 2a711d5..aa04655 100644 --- a/src/parsing/tokens.rs +++ b/src/parsing/tokens.rs @@ -31,6 +31,7 @@ pub(crate) const SEMICOLON: char = ';'; pub(crate) const R_BRACE: char = '{'; pub(crate) const L_BRACE: char = '}'; pub(crate) const PERCENT: char = '%'; +pub(crate) const COMMA: char = ','; // aliases