Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix exception when gist language is none #41

Merged
merged 1 commit into from Oct 8, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion gist.py
Expand Up @@ -217,10 +217,10 @@ def open_gist(gist_url):
edit = view.begin_edit()
view.insert(edit, 0, gist['files'][gist_filename]['content'])
view.end_edit(edit)
if not language: continue
language = gist['files'][gist_filename]['language']
new_syntax = os.path.join(language,"{0}.tmLanguage".format(language))
new_syntax_path = os.path.join(sublime.packages_path(), new_syntax)
print new_syntax_path
if os.path.exists(new_syntax_path):
view.set_syntax_file( new_syntax_path )

Expand Down