Skip to content

Fix extension detection #15

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

Open
wants to merge 1 commit into
base: 42881cb5ed1d423a4f33844569c61e55988a9cef
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions Support/lib/gist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,37 +68,37 @@ def process_selection
def get_extension
scope = ENV["TM_SCOPE"].split[0]
case scope
when /source\.actionscript/ ; "as"
when /source\.c/, "source.objc" ; "c"
when /source\.c\+\+/, "source.objc++" ; "cpp"
when /source\.actionscript$/ ; "as"
when /source\.c$/, "source.objc" ; "c"
when /source\.c\+\+$/, "source.objc++" ; "cpp"
# common-lisp-mode ; "el"
when /source\.css/ ; "css"
when /source\.diff/, "meta.diff.range" ; "diff"
when /source\.css$/ ; "css"
when /source\.diff$/, "meta.diff.range" ; "diff"
# emacs-lisp-mode ; "el"
when /source\.erlang/ ; "erl"
when /source\.haskell/, "text.tex.latex.haskel" ; "hs"
when /text\.html\.markdown/ ; "md"
when /text\.html/ ; "html"
when /source\.io/ ; "io"
when /source\.java/ ; "java"
when /source\.js/ ; "js"
when /source\.erlang$/ ; "erl"
when /source\.haskell$/, "text.tex.latex.haskel" ; "hs"
when /text\.html\.markdown$/ ; "md"
when /text\.html$/ ; "html"
when /source\.io$/ ; "io"
when /source\.java$/ ; "java"
when /source\.js$/ ; "js"
# jde-mode ; "java"
# js2-mode ; "js"
when /source\.lua/ ; "lua"
when /source\.ocaml/ ; "ml"
when /source\.objc/, "source.objc++" ; "m"
when /source\.perl/ ; "pl"
when /source\.php/ ; "php"
when /source\.python/ ; "sc"
when /source\.ruby/ ; "rb" # Emacs bundle uses rbx
when /text\.plain/ ; "txt"
when /source\.sql/ ; "sql"
when /source\.scheme/ ; "scm"
when /source\.smalltalk/ ; "st"
when /source\.shell/ ; "sh"
when /source\.tcl/, "text.html.tcl" ; "tcl"
when /source\.lex/ ; "tex"
when /text\.xml/, /text.xml.xsl/, /source.plist/, /text.xml.plist/ ; "xml"
when /source\.lua$/ ; "lua"
when /source\.ocaml$/ ; "ml"
when /source\.objc$/, "source.objc++" ; "m"
when /source\.perl$/ ; "pl"
when /source\.php$/ ; "php"
when /source\.python$/ ; "sc"
when /source\.ruby$/ ; "rb" # Emacs bundle uses rbx
when /text\.plain$/ ; "txt"
when /source\.sql$/ ; "sql"
when /source\.scheme$/ ; "scm"
when /source\.smalltalk$/ ; "st"
when /source\.shell$/ ; "sh"
when /source\.tcl$/, "text.html.tcl" ; "tcl"
when /source\.lex$/ ; "tex"
when /text\.xml$/, /text.xml.xsl$/, /source.plist$/, /text.xml.plist$/ ; "xml"
else "txt"
end
end
Expand Down