diff --git a/src/fenrirscreenreader/core/outputManager.py b/src/fenrirscreenreader/core/outputManager.py index a0269dea..3a4d2f44 100644 --- a/src/fenrirscreenreader/core/outputManager.py +++ b/src/fenrirscreenreader/core/outputManager.py @@ -65,7 +65,7 @@ class OutputManager: return if (len(text) > 1) and (text.strip(string.whitespace) == ""): return - is_capital = announce_capital and text[0].isupper() + is_capital = self._should_announce_capital(text, announce_capital) use_pitch_for_capital = False if is_capital: @@ -92,6 +92,17 @@ class OutputManager: text, interrupt, ignore_punctuation, use_pitch_for_capital, flush ) + def _should_announce_capital(self, text, announce_capital): + if not announce_capital or not text: + return False + if len(text) == 1: + return text.isupper() + if any(char.isspace() for char in text): + return False + if not any(char.isalpha() for char in text): + return False + return text.isupper() + def get_last_echo(self): return self.last_echo diff --git a/src/fenrirscreenreader/fenrirVersion.py b/src/fenrirscreenreader/fenrirVersion.py index 230b87a8..37237eb1 100644 --- a/src/fenrirscreenreader/fenrirVersion.py +++ b/src/fenrirscreenreader/fenrirVersion.py @@ -4,5 +4,5 @@ # Fenrir TTY screen reader # By Chrys, Storm Dragon, and contributors. -version = "2026.01.08" -code_name = "master" +version = "2026.01.10" +code_name = "testing"