Skip to content

Commit

Permalink
Merge pull request github-linguist#1831 from github/return-nil-on-no-…
Browse files Browse the repository at this point in the history
…ace-mode

Set "missing" ace modes to `text`
  • Loading branch information
gjtorikian committed Dec 9, 2014
2 parents 855cc52 + 0cbcbd4 commit 5a0c637
Show file tree
Hide file tree
Showing 3 changed files with 164 additions and 159 deletions.
4 changes: 4 additions & 0 deletions lib/linguist/language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,12 @@ def self.colors

# Public: A List of languages compatible with Ace.
#
# TODO: Remove this method in a 5.x release. Every language now needs an ace_mode
# key, so this function isn't doing anything unique anymore.
#
# Returns an Array of Languages.
def self.ace_modes
warn "This method will be deprecated in a future 5.x release. Every language now has an `ace_mode` set."
@ace_modes ||= all.select(&:ace_mode).sort_by { |lang| lang.name.downcase }
end

Expand Down
Loading

0 comments on commit 5a0c637

Please sign in to comment.