httpie-cli/httpie/output/formatters
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
..
__init__.py Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00
colors.py Fallback to JSON highlighting if subtype contains json 2014-09-25 00:10:06 +02:00
headers.py Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00
json.py Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00
xml.py Converted built-in formatters to formatter plugins. 2014-05-12 19:12:39 +02:00