Ensure frontmatter regex matches first possible closing delimiter

This commit is contained in:
Nat 2023-08-29 14:56:33 -07:00
parent c732fa92ed
commit ef6c07f0ea
Signed by: nat
GPG Key ID: B53AB05285D710D6
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ fn main() {
},
};
let fm_re = RegexBuilder::new(r"---\n(?<frontmatter>.+)\n---")
let fm_re = RegexBuilder::new(r"---\n(?<frontmatter>([^-]*?))\n---")
.dot_matches_new_line(true)
.build()
.unwrap();