italicparser: Parse(): Add static keyword to regex

In line with the other parsers, add the static keyword to the
regex.
This commit is contained in:
Albert S
2021-04-18 20:24:26 +02:00
parent adb1a910d4
commit a28769be2b
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -9,3 +9,4 @@ Patrick José Pereira ([email protected])
Martin Kopecky ([email protected])
Andrew Mettlach ([email protected])
Evan Klitzke ([email protected])
Albert Schwarzkopf ([email protected])
+1 -1
View File
@@ -39,7 +39,7 @@ public:
void
Parse(std::string& line) override
{
std::regex re("(?!.*`.*|.*<code>.*)\\*(?!.*`.*|.*<\\/code>.*)([^\\*]*)\\*(?!.*`.*|.*<\\/code>.*)");
static std::regex re("(?!.*`.*|.*<code>.*)\\*(?!.*`.*|.*<\\/code>.*)([^\\*]*)\\*(?!.*`.*|.*<\\/code>.*)");
static std::string replacement = "<i>$1</i>";
line = std::regex_replace(line, re, replacement);
}