Browse Source

Emoji: skip multi-word replacements.

Fixes #511.
master
Juho Hiltunen 7 years ago
parent
commit
bafc8e0f24
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      src/libespeak-ng/translate.c

+ 5
- 3
src/libespeak-ng/translate.c View File

@@ -1194,9 +1194,11 @@ int TranslateWord(Translator *tr, char *word_start, WORD_TAB *wtab, char *word_o
available -= n;
phonemes += n;

// skip to the next word in a multi-word replacement
while (!isspace(*word_out)) ++word_out;
while (isspace(*word_out)) ++word_out;
// skip to the next word in a multi-word replacement. Always skip at least one word.
for (dictionary_skipwords++; dictionary_skipwords > 0; dictionary_skipwords--) {
while (!isspace(*word_out)) ++word_out;
while (isspace(*word_out)) ++word_out;
}
}

// If the list file contains a text replacement to another

Loading…
Cancel
Save