Escape the *

This commit is contained in:
Arfon Smith
2015-01-26 15:18:40 -06:00
parent 7929e7ab9c
commit d773c2e90d

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=|mode:|-*-)\s*(\w+)/) }
data.lines.first(5).any? { |l| l.match(/\W(?:filetype=|ft=|mode:|-\*-)\s*(\w+)/) }
lang = $1
end
end