#66 ~ moving line and value separators into config file, so people can change it easily to value they need
This commit is contained in:
parent
7e93346c86
commit
dd72cbfc96
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"use_entire_file_if_no_selection" : true,
|
||||
"indent" : 2,
|
||||
"sort_keys" : false,
|
||||
"ensure_ascii" : false
|
||||
"use_entire_file_if_no_selection": true,
|
||||
"indent": 2,
|
||||
"sort_keys": false,
|
||||
"ensure_ascii": false,
|
||||
"line_separator": ",",
|
||||
"value_separator": ": "
|
||||
}
|
|
@ -67,15 +67,20 @@ class PrettyJsonBaseCommand(sublime_plugin.TextCommand):
|
|||
indent=s.get("indent", 2),
|
||||
ensure_ascii=s.get("ensure_ascii", False),
|
||||
sort_keys=s.get("sort_keys", False),
|
||||
separators=(',', ': '),
|
||||
separators=(s.get("line_separator", ","), s.get("value_separator", ": ")),
|
||||
use_decimal=True)
|
||||
|
||||
@staticmethod
|
||||
def json_dumps_minified(obj):
|
||||
line_separator = s.get("line_separator", ",")
|
||||
""":type : str"""
|
||||
value_separator = s.get("value_separator", ": ")
|
||||
""":type : str"""
|
||||
|
||||
return json.dumps(obj,
|
||||
ensure_ascii=s.get("ensure_ascii", False),
|
||||
sort_keys=s.get("sort_keys", False),
|
||||
separators=(',', ':'),
|
||||
separators=(line_separator.strip(), value_separator.strip()),
|
||||
use_decimal=True)
|
||||
|
||||
def highlight_error(self, message):
|
||||
|
|
Loading…
Reference in New Issue