Parser: Fix headline extraction for the default case broken by fbca85e5
This commit is contained in:
bovenliggende
634cb2d7ee
commit
c88889b10b
@ -31,7 +31,7 @@ std::vector<Headline> Parser::extractHeadlines(const std::string &content) const
|
|||||||
{
|
{
|
||||||
std::vector<Headline> result;
|
std::vector<Headline> result;
|
||||||
|
|
||||||
std::string reg = R"(\[h(1|2|3)\](\[.*?\])*(.*?)\[.*?\]*\[\/h\1\])";
|
std::string reg = R"(\[h(1|2|3)\](\[.*?\])*(.*?)(\[.*?\])*\[\/h\1\])";
|
||||||
std::regex headerfinder(reg);
|
std::regex headerfinder(reg);
|
||||||
auto begin = std::sregex_iterator(content.begin(), content.end(), headerfinder);
|
auto begin = std::sregex_iterator(content.begin(), content.end(), headerfinder);
|
||||||
auto end = std::sregex_iterator();
|
auto end = std::sregex_iterator();
|
||||||
|
Laden…
Verwijs in nieuw issue
Block a user