Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for citation autocompletion

  • Loading branch information...
commit c347f2e926b476b1f80f50c906d5c861f901aed9 1 parent 6191911
@z-m-k authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 latex_cite_completions.py
View
10 latex_cite_completions.py
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.