colout/colout/colout_json.py
nojhan e499f40f7d Bring global context variables to the themes.
Encapsulate global variables in the `context` dictionary.
Pass the context through the called themes, that can thus change the configuration.
2014-04-25 13:50:51 +02:00

13 lines
402 B
Python

def theme(context):
# This theme expect a formatted JSON input, with items spread across lines.
# See tools like "python -m json.tool" or "json_xs"
return context,[
[ '[\[\]{}],*\s*\n' ],
[ '" (:) ', "yellow" ],
[ '[\]}"](,)', "yellow" ],
[ "\"(-*[0-9]+\.*[0-9]*e*-*[0-9]*)\"", "blue" ],
[ '"(.*)"', "green" ],
[ """["']""", "cyan" ]
]