Permalink
Browse files

Fix for citation autocompletion

  • Loading branch information...
z-m-k committed Apr 5, 2013
1 parent 6191911 commit c347f2e926b476b1f80f50c906d5c861f901aed9
Showing with 5 additions and 5 deletions.
  1. +5 −5 latex_cite_completions.py
View
@@ -204,8 +204,8 @@ def on_query_completions(self, view, prefix, locations):
bibf.close()
print("%s has %s lines" % (repr(bibfname), len(bib)))
# note Unicode trickery
- keywords = [kp.search(line).group(1).encode().decode('ascii','ignore') for line in bib if line[0] == '@']
- titles = [tp.search(line).group(1).encode().decode('ascii','ignore') for line in bib if tp.search(line)]
+ keywords = [kp.search(line).group(1) for line in bib if line[0] == '@']
+ titles = [tp.search(line).group(1) for line in bib if tp.search(line)]
if len(keywords) != len(titles):
print("Bibliography " + repr(bibfname) + " is broken!")
# Filter out }'s and ,'s at the end. Ugly!
@@ -367,9 +367,9 @@ def run(self, edit):
bibf.close()
print("%s has %s lines" % (repr(bibfname), len(bib)))
# note Unicode trickery
- keywords = [kp.search(line).group(1).decode('ascii','ignore') for line in bib if line[0] == '@']
- titles = [tp.search(line).group(1).decode('ascii','ignore') for line in bib if tp.search(line)]
- authors = [ap.search(line).group(1).decode('ascii','ignore') for line in bib if ap.search(line)]
+ keywords = [kp.search(line).group(1) for line in bib if line[0] == '@']
+ titles = [tp.search(line).group(1) for line in bib if tp.search(line)]
+ authors = [ap.search(line).group(1) for line in bib if ap.search(line)]
# print zip(keywords,titles,authors)

0 comments on commit c347f2e

Please sign in to comment.