From c96a0e409d5be7de635bf9f640f51a9146562863 Mon Sep 17 00:00:00 2001 From: BenTalagan Date: Thu, 7 May 2020 15:07:27 +0200 Subject: [PATCH] Fixing sequences of ? and ! --- src/libespeak-ng/readclause.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libespeak-ng/readclause.c b/src/libespeak-ng/readclause.c index fe537908..73c2a3a7 100644 --- a/src/libespeak-ng/readclause.c +++ b/src/libespeak-ng/readclause.c @@ -1002,6 +1002,16 @@ int ReadClause(Translator *tr, char *buf, short *charix, int *charix_top, int n_ punct_data = 0; if ((punct_data = clause_type_from_codepoint(c1)) != CLAUSE_NONE) { + + // Handling of sequences of ? and ! like ??!?, !!??!, ?!! etc + // Use only first char as determinant + if(punct_data & (CLAUSE_QUESTION | CLAUSE_EXCLAMATION)) { + while(clause_type_from_codepoint(c2) & (CLAUSE_QUESTION | CLAUSE_EXCLAMATION)) { + c_next = GetC(); + c2 = c_next; + } + } + if (punct_data & CLAUSE_PUNCTUATION_IN_WORD) { // Armenian punctuation inside a word stressed_word = true;