Allow whitespace on the same line as closing front-matter chars
This commit is contained in:
parent
e92e4f1003
commit
4f6528cf37
|
@ -13,10 +13,10 @@ pub use section::SectionFrontMatter;
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref TOML_RE: Regex =
|
static ref TOML_RE: Regex =
|
||||||
Regex::new(r"^[[:space:]]*\+\+\+(\r?\n(?s).*?(?-s))\+\+\+(?:$|(?:\r?\n((?s).*(?-s))$))")
|
Regex::new(r"^[[:space:]]*\+\+\+(\r?\n(?s).*?(?-s))\+\+\+[[:space:]]*(?:$|(?:\r?\n((?s).*(?-s))$))")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
static ref YAML_RE: Regex =
|
static ref YAML_RE: Regex =
|
||||||
Regex::new(r"^[[:space:]]*---(\r?\n(?s).*?(?-s))---(?:$|(?:\r?\n((?s).*(?-s))$))").unwrap();
|
Regex::new(r"^[[:space:]]*---(\r?\n(?s).*?(?-s))---[[:space:]]*(?:$|(?:\r?\n((?s).*(?-s))$))").unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum RawFrontMatter<'a> {
|
pub enum RawFrontMatter<'a> {
|
||||||
|
|
Loading…
Reference in a new issue