diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 97c1015a..5e603f23 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -175,7 +175,7 @@ module Linguist disambiguate "Frege", "Forth", "Text" do |data| if /^(: |also |new-device|previous )/.match(data) Language["Forth"] - elsif /\s*(import|module|package|data|type) /.match(data) + elsif /^\s*(import|module|package|data|type) /.match(data) Language["Frege"] else Language["Text"] diff --git a/samples/Text/messages.fr b/samples/Text/messages.fr index da0269bb..c8108873 100644 --- a/samples/Text/messages.fr +++ b/samples/Text/messages.fr @@ -1 +1,2 @@ the green potato=la pomme de terre verte +le nouveau type de musique=the new type of music