Browse Source

Fixing sequences of ? and !

master
BenTalagan 5 years ago
parent
commit
c96a0e409d
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      src/libespeak-ng/readclause.c

+ 10
- 0
src/libespeak-ng/readclause.c View File

@@ -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;

Loading…
Cancel
Save