Skip to content

Commit

Permalink
Assert CodeMirror modes and mime types are valid against source
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Sep 23, 2016
1 parent 3abe081 commit 67ed060
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 199 deletions.
6 changes: 3 additions & 3 deletions lib/linguist/language.rb
Expand Up @@ -302,7 +302,7 @@ def initialize(attributes = {})

@ace_mode = attributes[:ace_mode]
@codemirror_mode = attributes[:codemirror_mode]
@codemirror_mime_mode = attributes[:codemirror_mime_mode]
@codemirror_mime_type = attributes[:codemirror_mime_type]
@wrap = attributes[:wrap] || false

# Set legacy search term
Expand Down Expand Up @@ -423,7 +423,7 @@ def initialize(attributes = {})
# # => "text/x-csrc"
#
# Returns a String name or nil
attr_reader :codemirror_mime_mode
attr_reader :codemirror_mime_type

# Public: Should language lines be wrapped
#
Expand Down Expand Up @@ -602,7 +602,7 @@ def inspect
:tm_scope => options['tm_scope'],
:ace_mode => options['ace_mode'],
:codemirror_mode => options['codemirror_mode'],
:codemirror_mime_mode => options['codemirror_mime_mode'],
:codemirror_mime_type => options['codemirror_mime_type'],
:wrap => options['wrap'],
:group_name => options['group'],
:searchable => options.fetch('searchable', true),
Expand Down

0 comments on commit 67ed060

Please sign in to comment.