WPTools 7: Word break of "sometext-, someothertext" leads to line starting with ","!

  • Hello, due to validation issues I have to stay with WPTools 7 with one application. Since this is a validated system an upgrade would cause a lot of code changes and a complete revalidation where I do not have any budget for. A small change in the code to fix this issue would only cause a small change request.

    Here I encounter the problem that the combibation of -, is wrapped between the hyphen and the komma, what looks very strange in text flow. Unfortunately these situations are very commonplace in german language.

    Is there some option to avoid this situation, can I modify the source or switch off wrapping the text at a hyphen?

    Any help is very appreciated although I still use version 7.

  • mschumann 25. Dezember 2021 um 11:03

    Hat den Titel des Themas von „Hyphenation of "sometext-, someothertext" leads to line starting with ","!“ zu „Word break of "sometext-, someothertext" leads to line starting with ","!“ geändert.
  • I solved it with a little modification of the code. If I set IGNORE_PLUSMINUS_IN_REFORMAT then no word break takes place on "-", so this was no option for me. Word break was already turned off if the character following the '-' was a digit, I extended it with ',' and ';'. This was a quick fix, maybe one shoild generally avoid breaking if an other breaking char follows but this is ok for me for now. Perhaps it helps someone else.

    File WPRTEFormatA.pas

    Code
    {$IFNDEF IGNORE_PLUSMINUS_IN_REFORMAT}
    ...
    ... 
    and not((Par.CharItem[i + 1] >= '0') and (Par.CharItem[i + 1] < '9')) and not(Par.CharItem[i + 1] = ',') and not(Par.CharItem[i + 1] = ';')))
    ...
  • wpsupport 27. Dezember 2021 um 12:08

    Hat den Titel des Themas von „Word break of "sometext-, someothertext" leads to line starting with ","!“ zu „WPTools 7: Word break of "sometext-, someothertext" leads to line starting with ","!“ geändert.
  • Its easy to reproduce by just feeding the text

    hans-, wurst-, käse-, salz-, hans-, wurst-, käse-, salz-, salz-, hans-, wurst-, käse-, salz-, salz-, hans-, wurst-, käse-, salz-, salz-, hans-, wurst-, käse-, salz-,

    into an edit box to make sure it wraps at a "-,"