From c657060277c9ae1ddd7aae9bd5d8ec77fbabec28 Mon Sep 17 00:00:00 2001 From: Joseph Spiros Date: Mon, 2 Mar 2009 01:13:48 -0500 Subject: [PATCH] Fixed word wrap regular expression. --- GrowlITTSWController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GrowlITTSWController.m b/GrowlITTSWController.m index b5c762b..1cd4265 100644 --- a/GrowlITTSWController.m +++ b/GrowlITTSWController.m @@ -132,7 +132,7 @@ } if (_wrapNotifications) { - text = [text stringByReplacingOccurrencesOfRegex:[NSString stringWithFormat:@"(.{1,%i})(?: +|$)\\n?|(.{%i})", _wrapColumns, _wrapColumns] withString:@"$1$2\n"]; + text = [text stringByReplacingOccurrencesOfRegex:[NSString stringWithFormat:@"(\\S\\S{%i,}|.{1,%i})(?:\\s+|$)", _wrapColumns, _wrapColumns] withString:@"$1\n"]; } //trim trailing whitespace -- 2.20.1