Disable std::regex use for older gcc versions

This commit is contained in:
Jean-Francois Dockes
2021-08-13 21:38:12 +02:00
parent f91185fd53
commit ce0352eff4
4 changed files with 23 additions and 0 deletions
+7
View File
@@ -154,6 +154,7 @@ bool TextSplitPTR::matchGroups()
return true;
}
#ifndef NO_STD_REGEX
// Replace HTTP(s) urls in text/plain with proper HTML anchors so that
// they become clickable in the preview. We don't make a lot of effort
// for validating, or catching things which are probably urls but miss
@@ -165,6 +166,12 @@ static string activate_urls(const string& in)
{
return std::regex_replace(in, url_re, urlRep);
}
#else
static string activate_urls(const string& in)
{
return in;
}
#endif
// Fix result text for display inside the gui text window.
//