style: make regex strings more readable

This commit is contained in:
Petra Baranski
2023-07-27 18:46:25 +02:00
parent aecb1b30e6
commit 123b921f2a
10 changed files with 17 additions and 17 deletions

View File

@@ -39,7 +39,7 @@ public:
void
Parse(std::string& line) override
{
static std::regex re("(?!.*`.*|.*<code>.*)\\*(?!.*`.*|.*<\\/code>.*)([^\\*]*)\\*(?!.*`.*|.*<\\/code>.*)");
static std::regex re(R"((?!.*`.*|.*<code>.*)\*(?!.*`.*|.*<\/code>.*)([^\*]*)\*(?!.*`.*|.*<\/code>.*))");
static std::string replacement = "<i>$1</i>";
line = std::regex_replace(line, re, replacement);
}