Permalink
Browse files

Merge branch 'master' of https://github.com/condemil/Gist

  • Loading branch information...
2 parents 38b85fd + 5bbf6a7 commit 0275df3fb62ecbde1aa3de0f1644494397db22be @shapov shapov committed Nov 14, 2013
Showing with 10 additions and 4 deletions.
  1. +10 −4 gist.py
View
14 gist.py
@@ -291,18 +291,24 @@ def gists_filter(all_gists):
gists_names = []
for gist in all_gists:
+ name = gist_title(gist)
+
if not gist['files']:
continue
- name = gist_title(gist)
+ if prefix:
+ if name[0][0:prefix_len] == prefix:
+ name[0] = name[0][prefix_len:] # remove prefix from name
+ else:
+ continue
- if prefix and name[0][0:prefix_len] == prefix:
- name[0] = name[0][prefix_len:]
- elif tag_prog:
+ if tag_prog:
match = re.search(tag_prog, name[0])
if match:
name[0] = name[0][0:match.start()] + name[0][match.end():]
+ else:
+ continue
gists.append(gist)
gists_names.append(name)

0 comments on commit 0275df3

Please sign in to comment.