]> git.donarmstrong.com Git - infobot.git/commitdiff
added debugging info for '.,' and '.,' problems
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 30 Aug 2000 13:09:13 +0000 (13:09 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 30 Aug 2000 13:09:13 +0000 (13:09 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@58 c11ca15a-4712-0410-83d8-924469b57eb5

src/Factoids/Update.pl

index 692d48dccbc3a7fa1169ac2218f69123c734f0ad..de5b83597b1ad83eeb3bc30e505d24d35ffba9f2 100644 (file)
@@ -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.");