Skip to content
This repository

fix exception when gist language is none #41

Merged
merged 1 commit into from almost 2 years ago

2 participants

Du Song Dmitry Budaev
Du Song

No description provided.

Dmitry Budaev condemil merged commit cc39105 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 08, 2012
Du Song freewizard gist language could be empty 718852b
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  gist.py
2  gist.py
@@ -217,10 +217,10 @@ def open_gist(gist_url):
217 217 edit = view.begin_edit()
218 218 view.insert(edit, 0, gist['files'][gist_filename]['content'])
219 219 view.end_edit(edit)
  220 + if not language: continue
220 221 language = gist['files'][gist_filename]['language']
221 222 new_syntax = os.path.join(language,"{0}.tmLanguage".format(language))
222 223 new_syntax_path = os.path.join(sublime.packages_path(), new_syntax)
223   - print new_syntax_path
224 224 if os.path.exists(new_syntax_path):
225 225 view.set_syntax_file( new_syntax_path )
226 226

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.