1
0
scáthán de https://github.com/quitesimpleorg/qsmaddy.git sioncronaithe 2025-02-21 11:22:33 +01:00

italicparser: Parse(): Add static keyword to regex

In line with the other parsers, add the static keyword to the
regex.
Tá an tiomantas seo le fáil i:
Albert S. 2021-04-18 11:40:15 +02:00
tuismitheoir adb1a910d4
tiomantas a28769be2b
D'athraigh 2 comhad le 2 breiseanna agus 1 scriosta

Féach ar an gComhad

@ -9,3 +9,4 @@ Patrick José Pereira (patrickelectric@gmail.com)
Martin Kopecky (martin.kopecky357@gmail.com)
Andrew Mettlach (dmmettlach@gmail.com)
Evan Klitzke (evan@eklitzke.org)
Albert Schwarzkopf (dev-maddy@quitesimple.org)

Féach ar an gComhad

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