Convert from mode names to mimetypes for better usage.

This commit is contained in:
Todd Berman
2016-09-23 13:40:19 -07:00
parent 2ea1ff2736
commit 88c74fa9c2
3 changed files with 196 additions and 198 deletions

View File

@@ -398,13 +398,13 @@ module Linguist
# Returns a String name or nil
attr_reader :ace_mode
# Public: Get Codemirror mode
# Public: Get Codemirror mode (as expressed by a mimetype)
#
# Examples
#
# # => "nil"
# # => "javascript"
# # => "clike"
# # => "text/x-javascript"
# # => "text/x-csrc"
#
# Returns a String name or nil
attr_reader :codemirror_mode

File diff suppressed because it is too large Load Diff

View File

@@ -350,7 +350,7 @@ class TestLanguage < Minitest::Test
end
def test_codemirror_mode
assert_equal 'clike', Language['C++'].codemirror_mode
assert_equal 'text/x-c++src', Language['C++'].codemirror_mode
end
def test_wrap