From e30d2c4c1f5e4ec966995497e891beef6b07a03e Mon Sep 17 00:00:00 2001 From: patrick96 Date: Thu, 24 Dec 2020 23:52:35 +0100 Subject: [PATCH 1/2] Remove tag compaction "optimizations" The intention was to remove tags that won't have an effect and join together consecutive tags. However the patterns used can just as well appear in regular text, so this can replace characters inside user defined text and not just formatting tags. Fixes #2331 --- CHANGELOG.md | 4 +++- src/components/controller.cpp | 11 +---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eed88973..289ca7e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Wrong text displayed if module text ends with `}` ([`#2331`](https://github.com/polybar/polybar/issues/2331)) ## [3.5.3] - 2020-12-23 ### Build -- Don't use `git` when building documentation ([`#2311`](https://github.com/polybar/polybar/issues/2309)) +- Don't use `git` when building documentation ([`#2309`](https://github.com/polybar/polybar/issues/2309)) ### Fixed - Empty color values are no longer treated as invalid and no longer produce an error. diff --git a/src/components/controller.cpp b/src/components/controller.cpp index f55a05d1..86a1e983 100644 --- a/src/components/controller.cpp +++ b/src/components/controller.cpp @@ -646,16 +646,7 @@ bool controller::process_update(bool force) { block_contents += padding_right; } - // Strip unnecessary reset tags - block_contents = string_util::replace_all(block_contents, "T-}%{T", "T"); - block_contents = string_util::replace_all(block_contents, "B-}%{B#", "B#"); - block_contents = string_util::replace_all(block_contents, "F-}%{F#", "F#"); - block_contents = string_util::replace_all(block_contents, "U-}%{U#", "U#"); - block_contents = string_util::replace_all(block_contents, "u-}%{u#", "u#"); - block_contents = string_util::replace_all(block_contents, "o-}%{o#", "o#"); - - // Join consecutive tags - contents += string_util::replace_all(block_contents, "}%{", " "); + contents += block_contents; } try { From fdc670a9ddf561b8bb92b67f4cf4c190678e6af1 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Thu, 7 Jan 2021 13:44:30 +0100 Subject: [PATCH 2/2] Release 3.5.4 --- CHANGELOG.md | 6 ++++-- version.txt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 289ca7e3..bf5eb9d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,3 @@ - # Changelog All notable changes to this project will be documented in this file. @@ -10,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [3.5.4] - 2021-01-07 ### Fixed - Wrong text displayed if module text ends with `}` ([`#2331`](https://github.com/polybar/polybar/issues/2331)) @@ -19,5 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Empty color values are no longer treated as invalid and no longer produce an error. -[Unreleased]: https://github.com/polybar/polybar/compare/3.5.3...HEAD +[Unreleased]: https://github.com/polybar/polybar/compare/3.5.4...HEAD +[3.5.4]: https://github.com/polybar/polybar/releases/tag/3.5.4 [3.5.3]: https://github.com/polybar/polybar/releases/tag/3.5.3 diff --git a/version.txt b/version.txt index af8cdbfd..094129b6 100644 --- a/version.txt +++ b/version.txt @@ -1,4 +1,4 @@ # Polybar version information # Update this on every release # This is used to create the version string if a git repo is not available -3.5.3 +3.5.4