Skip to content

Commit 86cdda3

Browse files
committed
[md] when parsing frontmatter anchor to the start of the string
1 parent 4f87fc0 commit 86cdda3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/md4cpp.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ file
170170
parse_file(const std::filesystem::path& src, const string_fragment& sf)
171171
{
172172
static const auto FRONTMATTER_RE = lnav::pcre2pp::code::from_const(
173-
R"((?:^---\n(.*?)\n---\n|^\+\+\+\n(.*)\n\+\+\+\n))",
173+
R"((?:\A^---\n(.*?)\n---\n|\A^\+\+\+\n(.*)\n\+\+\+\n))",
174174
PCRE2_MULTILINE | PCRE2_DOTALL);
175175
thread_local auto md = FRONTMATTER_RE.create_match_data();
176176

0 commit comments

Comments
 (0)