Skip to content

Commit

Permalink
Merge pull request #339 from nebhale/hal-mimetype
Browse files Browse the repository at this point in the history
Add application/hal+json Mime Types
  • Loading branch information
jneen committed Nov 18, 2015
2 parents a66be35 + 67e639d commit 76647eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rouge/lexers/javascript.rb
Expand Up @@ -206,7 +206,8 @@ class JSON < RegexLexer
desc "JavaScript Object Notation (json.org)"
tag 'json'
filenames '*.json'
mimetypes 'application/json', 'application/vnd.api+json'
mimetypes 'application/json', 'application/vnd.api+json',
'application/hal+json'

# TODO: is this too much of a performance hit? JSON is quite simple,
# so I'd think this wouldn't be too bad, but for large documents this
Expand Down
1 change: 1 addition & 0 deletions spec/lexers/javascript_spec.rb
Expand Up @@ -24,6 +24,7 @@
assert_guess :mimetype => 'text/javascript'
assert_guess Rouge::Lexers::JSON, :mimetype => 'application/json'
assert_guess Rouge::Lexers::JSON, :mimetype => 'application/vnd.api+json'
assert_guess Rouge::Lexers::JSON, :mimetype => 'application/hal+json'
end

it 'guesses by source' do
Expand Down

0 comments on commit 76647eb

Please sign in to comment.