projects
/
rainbowstream.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8dda70
)
keyword None
author
Orakaro
<nhatminh_179@hotmail.com>
Sun, 25 May 2014 11:23:49 +0000
(20:23 +0900)
committer
Orakaro
<nhatminh_179@hotmail.com>
Sun, 25 May 2014 11:23:49 +0000
(20:23 +0900)
rainbowstream/rainbow.py
patch
|
blob
|
blame
|
history
diff --git
a/rainbowstream/rainbow.py
b/rainbowstream/rainbow.py
index 84b89ffcf6a8f3988bef4c0c72257dbf98641297..9570fee261d8f43dcaece15dfb9e4371d35da010 100644
(file)
--- a/
rainbowstream/rainbow.py
+++ b/
rainbowstream/rainbow.py
@@
-42,7
+42,8
@@
def draw(t,keyword=None):
# Highlight link
tweet = map(lambda x: cyan(x) if x[0:7] == 'http://' else x, tweet)
# Highlight search keyword
- tweet = map(lambda x: on_yellow(x) if ''.join(c for c in x if c.isalnum()).lower() == keyword.lower() else x, tweet)
+ if keyword:
+ tweet = map(lambda x: on_yellow(x) if ''.join(c for c in x if c.isalnum()).lower() == keyword.lower() else x, tweet)
tweet = ' '.join(tweet)
# Draw rainbow