Skip to content

Commit

Permalink
Merge pull request #3214 from pchaigno/remove-sublime-syntax
Browse files Browse the repository at this point in the history
Remove support for .sublime-syntax
  • Loading branch information
arfon authored Sep 14, 2016
2 parents 8dc4a13 + 65491d4 commit e57273c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions script/convert-grammars
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DirectoryPackage
case File.extname(path.downcase)
when '.plist'
path.split('/')[-2] == 'Syntaxes'
when '.tmlanguage', '.yaml-tmlanguage', '.sublime-syntax'
when '.tmlanguage', '.yaml-tmlanguage'
true
when '.cson', '.json'
path.split('/')[-2] == 'grammars'
Expand Down Expand Up @@ -114,7 +114,7 @@ class SVNPackage
def fetch(tmp_dir)
`svn export -q "#{url}/Syntaxes" "#{tmp_dir}/Syntaxes"`
raise "Failed to export SVN repository: #{url}: #{$?.to_s}" unless $?.success?
Dir["#{tmp_dir}/Syntaxes/*.{plist,tmLanguage,tmlanguage,YAML-tmLanguage,sublime-syntax}"]
Dir["#{tmp_dir}/Syntaxes/*.{plist,tmLanguage,tmlanguage,YAML-tmLanguage}"]
end
end

Expand Down Expand Up @@ -148,7 +148,7 @@ def load_grammar(path)
case File.extname(path.downcase)
when '.plist', '.tmlanguage'
Plist::parse_xml(path)
when '.yaml-tmlanguage', '.sublime-syntax'
when '.yaml-tmlanguage'
content = File.read(path)
# Attempt to parse YAML file even if it has a YAML 1.2 header
if content.lines[0] =~ /^%YAML[ :]1\.2/
Expand Down Expand Up @@ -180,7 +180,7 @@ def load_grammars(tmp_dir, source, all_scopes)
else
SingleFile.new(source)
end
elsif source.end_with?('.tmLanguage', '.plist', '.YAML-tmLanguage', '.sublime-syntax')
elsif source.end_with?('.tmLanguage', '.plist', '.YAML-tmLanguage')
SingleGrammar.new(source)
elsif source.start_with?('https://github.com')
GitHubPackage.new(source)
Expand Down

0 comments on commit e57273c

Please sign in to comment.