Skip to content

Commit

Permalink
Fixed a typo causing Syllabify to add splits before punctuation.
Browse files Browse the repository at this point in the history
  • Loading branch information
98ahni committed Nov 28, 2024
1 parent c12ab3e commit cdd8f3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Serialization/Syllabify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ namespace Serialization
{
for (int j = 1; j <= wrappedWord.size() - i && j <= PatternData::myMaxPatternSize[aLevel]; ++j)
{
if (i + j < wrappedWord.size() && ispunct(wrappedWord[i + j - 1]))
if (i + j < wrappedWord.size() && iscntrl(static_cast<unsigned char>(wrappedWord[i + j - 1])))
continue; // A pattern that ends with "a" must not match "ä"

const auto it = PatternData::myPatterns[aLevel].find(wrappedWord.substr(i, j));
Expand Down Expand Up @@ -232,8 +232,8 @@ namespace Serialization

char currentChar = aText[i];

if (ispunct(currentChar))
continue;
//if (ispunct(static_cast<unsigned char>(currentChar)))
// continue;

//const QChar::Script script = QChar::script(currentChar);
bool isAlNum = isalnum(currentChar);
Expand Down

0 comments on commit cdd8f3b

Please sign in to comment.