Add Codemirror modes

This commit is contained in:
Todd Berman
2016-09-20 23:23:22 -07:00
parent 00efd6a463
commit cc5f1c57ca
3 changed files with 209 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
/Gemfile.lock /Gemfile.lock
.bundle/ .bundle/
.idea
benchmark/ benchmark/
lib/linguist/samples.json lib/linguist/samples.json
/grammars /grammars

View File

@@ -300,6 +300,7 @@ module Linguist
end end
@ace_mode = attributes[:ace_mode] @ace_mode = attributes[:ace_mode]
@codemirror_mode = attributes[:codemirror_mode]
@wrap = attributes[:wrap] || false @wrap = attributes[:wrap] || false
# Set legacy search term # Set legacy search term
@@ -397,6 +398,17 @@ 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
#
# Examples
#
# # => "nil"
# # => "javascript"
# # => "clike"
#
# Returns a String name or nil
attr_reader :codemirror_mode
# Public: Should language lines be wrapped # Public: Should language lines be wrapped
# #
# Returns true or false # Returns true or false

File diff suppressed because it is too large Load Diff