httpie-cli/httpie
Dennis Brakhane f1cd289d51 Fallback to JSON highlighting if subtype contains json
Some JSON based formats like JSON Home Documents[1] don't
use a '+json' suffix, but simply contain json in their
MIME type. Also, some servers might use (outdated)
types like 'application/x-json'.

The JSON formatter can already handle those cases,
but the highlighter was ignoring them.

This commit will let the highlighter choose the JSON
lexer if no other lexer could be found and the MIME subtype
contains 'json'

[1] http://tools.ietf.org/html/draft-nottingham-json-home-03
2014-09-25 00:10:06 +02:00
..
output Fallback to JSON highlighting if subtype contains json 2014-09-25 00:10:06 +02:00
plugins Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00
__init__.py Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00
__main__.py Added docstrings, refactored input. 2012-07-26 07:23:00 +02:00
cli.py Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00
client.py Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00
compat.py Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00
config.py Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00
context.py Improved terminal color depth detection via curses 2014-09-08 07:46:53 +02:00
core.py Fixed tests. 2014-06-03 19:45:57 +02:00
downloads.py Cleanup 2014-07-18 13:39:47 +02:00
input.py Fixed --output=/dev/null on Linux 2014-09-07 10:22:21 +02:00
models.py Run tests against local httpbin instance via pytest-httpbin. 2014-06-28 16:38:41 +02:00
sessions.py Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00
utils.py Modularized output, refactoring 2014-04-27 21:58:00 +02:00