nvda
cc222a06 - Return "blank" if text empty due to processing (#13483)

Commit
2 years ago
Return "blank" if text empty due to processing (#13483) closes #13431 After processing a text for dictionary substitutions and symbol level, the result might be an empty string, which leads to nothing being spoken at all (not even "blank"). Something should always be spoken when reading text, since nothing being spoken gives the appearance of NVDA freezing. Description of how this pull request fixes the issue: When a speech sequence is submitted to speech.speak, if all strings of the sequence become empty due to symbol level and dictionary substitution processing, then the sequence is considered blank and "blank" is appended to it. The function now also takes an additional argument, suppressBlanks, which is false by default. This parameter allows callers to suppress the "blank" being appended to the sequence, even if the conditions are met. The main intention is to suppress this behavior during say all. Usages of speech.speak have been updated to specify this parameter when appropriate.
Author
Parents
Loading