Fix linkparser line handling with multiple parenthesis

This commit is contained in:
Petra Baranski
2025-03-28 03:37:04 +01:00
committed by GitHub
parent a5b18310a8
commit 4518e402c7
4 changed files with 19 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ public:
*/
void Parse(std::string& line) override
{
static std::regex re(R"(\[([^\]]*)\]\(([^\]]*)\))");
static std::regex re(R"(\[([^\]]*)\]\(([^)]*)\))");
static std::string replacement = "<a href=\"$2\">$1</a>";
line = std::regex_replace(line, re, replacement);