From 08a7f252999c50889a5b90d70e99b8a5e2f5ea91 Mon Sep 17 00:00:00 2001 From: Alde Rojas Date: Thu, 1 Jan 2026 05:45:40 -0600 Subject: [PATCH] Add match_continuous to regex search call --- include/minja/minja.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/minja/minja.hpp b/include/minja/minja.hpp index 943e290..af21773 100644 --- a/include/minja/minja.hpp +++ b/include/minja/minja.hpp @@ -1861,7 +1861,7 @@ class Parser { auto start = it; consumeSpaces(space_handling); std::smatch match; - if (std::regex_search(it, end, match, regex) && match.position() == 0) { + if (std::regex_search(it, end, match, regex, std::regex_constants::match_continuous) && match.position() == 0) { it += match[0].length(); std::vector ret; for (size_t i = 0, n = match.size(); i < n; ++i) { @@ -1876,7 +1876,7 @@ class Parser { auto start = it; consumeSpaces(space_handling); std::smatch match; - if (std::regex_search(it, end, match, regex) && match.position() == 0) { + if (std::regex_search(it, end, match, regex, std::regex_constants::match_continuous) && match.position() == 0) { it += match[0].length(); return match[0].str(); }