mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Convert from mode names to mimetypes for better usage.
This commit is contained in:
@@ -398,13 +398,13 @@ module Linguist
|
|||||||
# Returns a String name or nil
|
# Returns a String name or nil
|
||||||
attr_reader :ace_mode
|
attr_reader :ace_mode
|
||||||
|
|
||||||
# Public: Get Codemirror mode
|
# Public: Get Codemirror mode (as expressed by a mimetype)
|
||||||
#
|
#
|
||||||
# Examples
|
# Examples
|
||||||
#
|
#
|
||||||
# # => "nil"
|
# # => "nil"
|
||||||
# # => "javascript"
|
# # => "text/x-javascript"
|
||||||
# # => "clike"
|
# # => "text/x-csrc"
|
||||||
#
|
#
|
||||||
# Returns a String name or nil
|
# Returns a String name or nil
|
||||||
attr_reader :codemirror_mode
|
attr_reader :codemirror_mode
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -350,7 +350,7 @@ class TestLanguage < Minitest::Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_codemirror_mode
|
def test_codemirror_mode
|
||||||
assert_equal 'clike', Language['C++'].codemirror_mode
|
assert_equal 'text/x-c++src', Language['C++'].codemirror_mode
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_wrap
|
def test_wrap
|
||||||
|
|||||||
Reference in New Issue
Block a user