mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add Codemirror modes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
/Gemfile.lock
|
/Gemfile.lock
|
||||||
.bundle/
|
.bundle/
|
||||||
|
.idea
|
||||||
benchmark/
|
benchmark/
|
||||||
lib/linguist/samples.json
|
lib/linguist/samples.json
|
||||||
/grammars
|
/grammars
|
||||||
|
|||||||
@@ -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
Reference in New Issue
Block a user