Merge pull request #4957 from 85ae/fix-4955

fix: issue #4955 wrong behaviour of regex for sway/window 'rewrite'
This commit is contained in:
Alexis Rouillard
2026-07-03 21:44:07 +02:00
committed by GitHub
+1 -1
View File
@@ -18,7 +18,7 @@ std::string rewriteString(const std::string& value, const Json::Value& rules) {
// malformated regexes will cause an exception.
// in this case, log error and try the next rule.
const std::regex rule{it.key().asString(), std::regex_constants::icase};
if (std::regex_match(value, rule)) {
if (std::regex_match(res, rule)) {
res = std::regex_replace(res, rule, it->asString());
}
} catch (const std::regex_error& e) {