From: dms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Date: Wed, 30 Aug 2000 13:09:13 +0000 (+0000)
Subject: added debugging info for '.,' and '.,' problems
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=57b1cbadfc1a784cdedd917bdfcd033097dfc01d;p=infobot.git

added debugging info for '.,' and '.,' problems


git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@58 c11ca15a-4712-0410-83d8-924469b57eb5
---

diff --git a/src/Factoids/Update.pl b/src/Factoids/Update.pl
index 692d48d..de5b835 100644
--- a/src/Factoids/Update.pl
+++ b/src/Factoids/Update.pl
@@ -70,6 +70,20 @@ sub update {
 	    if ($also_or) {			# 'is also ||'.
 		$rhs = $exists.' || '.$rhs;
 	    } else {
+#		if ($exists =~ s/\,\s*$/,  /) {
+		if ($exists =~ /\,\s*$/) {
+		    &DEBUG("current has trailing comma, just append as is");
+		    # $rhs =~ s/^\s+//;
+		    # $rhs = $exists." ".$rhs;	# keep comma.
+		}
+
+		if ($exists =~ /\.\s*$/) {
+		    &DEBUG("current has trailing period, just append as is with 2 WS");
+		    # $rhs =~ s/^\s+//;
+		    # use ucfirst();?
+		    # $rhs = $exists."  ".$rhs;	# keep comma.
+		}
+
 		if ($rhs =~ /^[A-Z]/) {
 		    if ($rhs =~ /\w+\s*$/) {
 			&status("auto insert period to factoid.");