Adding Emacs modes

This commit is contained in:
Arfon Smith
2015-01-26 15:11:55 -06:00
parent e8e95f113c
commit 7929e7ab9c

View File

@@ -23,7 +23,7 @@ module Linguist
#
# Returns a String or nil
def self.modeline(data)
data.lines.first(5).any? { |l| l.match(/\W(?:filetype|ft)=\s*(\w+)/) }
data.lines.first(5).any? { |l| l.match(/\W(?:filetype=|ft=|mode:|-*-)\s*(\w+)/) }
lang = $1
end
end