diff --git a/lib/rouge/lexers/json.rb b/lib/rouge/lexers/json.rb index d8c3e27d6a..5e5804a0ab 100644 --- a/lib/rouge/lexers/json.rb +++ b/lib/rouge/lexers/json.rb @@ -9,7 +9,8 @@ class JSON < RegexLexer tag 'json' filenames '*.json' mimetypes 'application/json', 'application/vnd.api+json', - 'application/hal+json' + 'application/hal+json', 'application/problem+json', + 'application/schema+json' state :root do rule /\s+/m, Text::Whitespace diff --git a/spec/lexers/javascript_spec.rb b/spec/lexers/javascript_spec.rb index ce39e9f52f..951408969d 100644 --- a/spec/lexers/javascript_spec.rb +++ b/spec/lexers/javascript_spec.rb @@ -26,6 +26,8 @@ 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' + assert_guess Rouge::Lexers::JSON, :mimetype => 'application/problem+json' + assert_guess Rouge::Lexers::JSON, :mimetype => 'application/schema+json' end it 'guesses by source' do