From 2f14336692ca3d5f75fcf6d000c2adbd41dae95c Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 18 Apr 2021 11:40:15 +0200 Subject: [PATCH] italicparser: Parse(): Add static keyword to regex In line with the other parsers, add the static keyword to the regex. --- include/maddy/italicparser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/maddy/italicparser.h b/include/maddy/italicparser.h index f31b96e..ed59744 100644 --- a/include/maddy/italicparser.h +++ b/include/maddy/italicparser.h @@ -39,7 +39,7 @@ public: void Parse(std::string& line) override { - std::regex re("(?!.*`.*|.*.*)\\*(?!.*`.*|.*<\\/code>.*)([^\\*]*)\\*(?!.*`.*|.*<\\/code>.*)"); + static std::regex re("(?!.*`.*|.*.*)\\*(?!.*`.*|.*<\\/code>.*)([^\\*]*)\\*(?!.*`.*|.*<\\/code>.*)"); static std::string replacement = "$1"; line = std::regex_replace(line, re, replacement); }