mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Regular expression improved
This commit is contained in:
parent
9218968d2f
commit
4c4d09992e
@ -80,7 +80,7 @@ waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config)
|
||||
std::regex_replace(config_["format-calendar-weeks"].asString(), std::regex("\\{\\}"),
|
||||
(first_day_of_week() == date::Monday) ? "{:%V}" : "{:%U}");
|
||||
weeks_format_left_gaps =
|
||||
std::regex_replace(weeks_format_, std::regex(".*<b>|</b>.*|\\{.?+\\}"), "").length();
|
||||
std::regex_replace(weeks_format_, std::regex("</?[^>]+>|\\{.*\\}"), "").length();
|
||||
} else {
|
||||
weeks_format_ = "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user