From bf9313a164f51166a1499c5e51c9f0bf4728700e Mon Sep 17 00:00:00 2001 From: An Tao Date: Wed, 7 Aug 2019 12:55:14 +0800 Subject: [PATCH] Modify the 'create view' command of drogon_ctl (#208) --- drogon_ctl/create_view.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drogon_ctl/create_view.cc b/drogon_ctl/create_view.cc index f890d4c6..4923e71b 100644 --- a/drogon_ctl/create_view.cc +++ b/drogon_ctl/create_view.cc @@ -423,7 +423,7 @@ void create_view::newViewSourceFile(std::ofstream &file, buffer = line; if (buffer.length() > 0) { - std::regex re("\\{%[ \\t]*([^ \\t%]*)[^%]*%\\}"); + std::regex re("\\{%[ \\t]*(((?!%\\}).)*[^ \\t])[ \\t]*%\\}"); buffer = std::regex_replace(buffer, re, "<%c++$$$$<<$1;%>"); } parseLine(file, buffer, streamName, viewDataName, cxx_flag);