Skip to content
Snippets Groups Projects
Commit a8a81b7e authored by Jeanine Adkisson's avatar Jeanine Adkisson
Browse files

Merge pull request #259 from brettchalupa/json-api-mime-type

Register JSON API mimetype for JSON lexer
parents d51f3f7d 25725d50
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -206,7 +206,7 @@ module Rouge
desc "JavaScript Object Notation (json.org)"
tag 'json'
filenames '*.json'
mimetypes 'application/json'
mimetypes 'application/json', 'application/vnd.api+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
Loading
Loading
Loading
Loading
@@ -23,6 +23,7 @@ describe Rouge::Lexers::Javascript do
it 'guesses by mimetype' do
assert_guess :mimetype => 'text/javascript'
assert_guess Rouge::Lexers::JSON, :mimetype => 'application/json'
assert_guess Rouge::Lexers::JSON, :mimetype => 'application/vnd.api+json'
end
 
it 'guesses by source' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment