mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Renamed text in Text
This commit is contained in:
@@ -156,13 +156,13 @@ module Linguist
|
||||
end
|
||||
end
|
||||
|
||||
disambiguate "Frege", "Forth", "text" do |data|
|
||||
disambiguate "Frege", "Forth", "Text" do |data|
|
||||
if /^(: |also |new-device|previous )/.match(data)
|
||||
Language["Forth"]
|
||||
elsif /\s*(import|module|package|data|type) /.match(data)
|
||||
Language["Frege"]
|
||||
else
|
||||
Language["text"]
|
||||
Language["Text"]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -2881,6 +2881,15 @@ Tea:
|
||||
tm_scope: source.tea
|
||||
ace_mode: text
|
||||
|
||||
Text:
|
||||
type: prose
|
||||
wrap: true
|
||||
extensions:
|
||||
- .txt
|
||||
- .fr
|
||||
tm_scope: none
|
||||
ace_mode: text
|
||||
|
||||
Textile:
|
||||
type: prose
|
||||
ace_mode: textile
|
||||
@@ -3242,15 +3251,6 @@ reStructuredText:
|
||||
- .rest
|
||||
ace_mode: text
|
||||
|
||||
text:
|
||||
type: prose
|
||||
wrap: true
|
||||
extensions:
|
||||
- .txt
|
||||
- .fr
|
||||
tm_scope: none
|
||||
ace_mode: text
|
||||
|
||||
wisp:
|
||||
type: programming
|
||||
ace_mode: clojure
|
||||
|
||||
@@ -64,7 +64,7 @@ class TestBlob < Test::Unit::TestCase
|
||||
assert_equal "attachment; filename=linguist.gem", fixture_blob("Binary/linguist.gem").disposition
|
||||
assert_equal "attachment; filename=octocat.ai", fixture_blob("Binary/octocat.ai").disposition
|
||||
assert_equal "inline", fixture_blob("Data/README").disposition
|
||||
assert_equal "inline", sample_blob("text/foo.txt").disposition
|
||||
assert_equal "inline", sample_blob("Text/foo.txt").disposition
|
||||
assert_equal "inline", sample_blob("Ruby/grit.rb").disposition
|
||||
assert_equal "inline", fixture_blob("Binary/octocat.png").disposition
|
||||
end
|
||||
@@ -75,7 +75,7 @@ class TestBlob < Test::Unit::TestCase
|
||||
|
||||
def test_lines
|
||||
assert_equal ["module Foo", "end", ""], sample_blob("Ruby/foo.rb").lines
|
||||
assert_equal ["line 1", "line 2", ""], sample_blob("text/mac.txt").lines
|
||||
assert_equal ["line 1", "line 2", ""], sample_blob("Text/mac.txt").lines
|
||||
assert_equal 475, sample_blob("Emacs Lisp/ess-julia.el").lines.length
|
||||
end
|
||||
|
||||
@@ -104,14 +104,14 @@ class TestBlob < Test::Unit::TestCase
|
||||
def test_encoding
|
||||
assert_equal "ISO-8859-2", fixture_blob("Data/README").encoding
|
||||
assert_equal "ISO-8859-2", fixture_blob("Data/README").ruby_encoding
|
||||
assert_equal "UTF-8", sample_blob("text/foo.txt").encoding
|
||||
assert_equal "UTF-8", sample_blob("text/foo.txt").ruby_encoding
|
||||
assert_equal "UTF-8", sample_blob("Text/foo.txt").encoding
|
||||
assert_equal "UTF-8", sample_blob("Text/foo.txt").ruby_encoding
|
||||
assert_equal "UTF-16LE", fixture_blob("Data/utf16le").encoding
|
||||
assert_equal "UTF-16LE", fixture_blob("Data/utf16le").ruby_encoding
|
||||
assert_equal "UTF-16LE", fixture_blob("Data/utf16le-windows").encoding
|
||||
assert_equal "UTF-16LE", fixture_blob("Data/utf16le-windows").ruby_encoding
|
||||
assert_equal "ISO-2022-KR", sample_blob("text/ISO-2022-KR.txt").encoding
|
||||
assert_equal "binary", sample_blob("text/ISO-2022-KR.txt").ruby_encoding
|
||||
assert_equal "ISO-2022-KR", sample_blob("Text/ISO-2022-KR.txt").encoding
|
||||
assert_equal "binary", sample_blob("Text/ISO-2022-KR.txt").ruby_encoding
|
||||
assert_nil fixture_blob("Binary/dog.o").encoding
|
||||
end
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ class TestHeuristcs < Test::Unit::TestCase
|
||||
assert_heuristics({
|
||||
"Frege" => all_fixtures("Frege"),
|
||||
"Forth" => all_fixtures("Forth"),
|
||||
"text" => all_fixtures("text")
|
||||
"Text" => all_fixtures("Text")
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user