Le 07/04/2011 11:11, Stephan Witt a écrit :
What exactly looks weird?
The test for hard hyphen altogether or the test for '-' or for space around it
or some other implementation detail?

The method that tests for the standalone hyphen seems complicated to me and hard-codes one particular case. There is a similar problem with ' character, for example, that can either be part of the word "don't" or not, like in possessive forms.

I think hyphen and commas are in the class of characters that are part of the word only when there is stuff on their right and on their left. The discussion I pointed to earlier from mozilla would probably be enlightening and give solutions that feel better than special casing.

However, I do not have more intelligent things to propose right now.

JMarc

Reply via email to