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 11:40:15 +02:00
父節點 adb1a910d4
當前提交 2f14336692
共有 1 個文件被更改,包括 1 次插入1 次删除

查看文件

@ -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);
}