Skip to content

Commit b6103f2

Browse files
authored
Merge pull request #22 from sololance/patch-1
Add missing cashtags in extract
2 parents c2f3f18 + e5a4674 commit b6103f2

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

lib/Twitter/Text/Extractor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public function extract($tweet)
9292
{
9393
return array(
9494
'hashtags' => $this->extractHashtags($tweet),
95+
'cashtags' => $this->extractCashtags($tweet),
9596
'urls' => $this->extractURLs($tweet),
9697
'mentions' => $this->extractMentionedScreennames($tweet),
9798
'replyto' => $this->extractReplyScreenname($tweet),

tests/Twitter/Text/ExtractorTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ public function testExtract()
157157
'hashtags' => array(
158158
'hashtag1'
159159
),
160+
'cashtags' => array(
161+
'TEST',
162+
'Stock',
163+
'symbol'
164+
),
160165
'urls' => array(
161166
'http://example.com'
162167
),

0 commit comments

Comments
 (0)