Expect formatted json as input, blue numbers

This patch avoid coloring what's inside item's strings, but expect a formatted input.
This commit is contained in:
Johann Dreo 2013-05-17 11:13:53 +02:00
commit 1fed20cba7

View file

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