Add optional comma to metadata

pull/1/head
trivernis 4 years ago
parent 815bd26e51
commit 63345854a0

2
Cargo.lock generated

@ -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)",

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

@ -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
```

@ -454,6 +454,10 @@ impl Parser {
if self.check_special_group(&QUOTES) {
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" {

@ -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

Loading…
Cancel
Save