Changeset b49aaf8 for perl/modules


Ignore:
Timestamp:
Sep 20, 2011, 11:15:31 PM (10 years ago)
Author:
Edward Z. Yang <ezyang@mit.edu>
Branches:
master, release-1.9
Children:
eb20731
Parents:
4b23009
git-author:
Edward Z. Yang <ezyang@mit.edu> (06/21/11 10:19:16)
git-committer:
Edward Z. Yang <ezyang@mit.edu> (09/20/11 23:15:31)
Message:
Replace punctuation with spaces, and spaces to dashes, on rnjacob's suggestion.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Facebook/lib/BarnOwl/Module/Facebook/Handle.pm

    r77d1ef1 rb49aaf8  
    2323        # stupidly pick the longest one, and only return one.
    2424        my $sentence = shift;
    25         $sentence =~ s/[[:punct:]]//g;
     25        $sentence =~ s/[[:punct:]]+/ /g;
    2626        my @words = split(' ', lc($sentence));
    2727        return () unless @words;
     
    207207            my @keywords = keywords($post->{name} || $post->{message});
    208208            my $topic = $keywords[0] || 'personal';
     209            $topic =~ s/ /-/g;
    209210            $self->{topics}->{$post_id} = $topic;
    210211            # XXX indexing is fragile
Note: See TracChangeset for help on using the changeset viewer.