Estetic changes
This commit is contained in:
parent
c5d3554ff7
commit
1a2e9104ff
|
@ -4,6 +4,7 @@ import json
|
|||
|
||||
s = sublime.load_settings("Pretty JSON.sublime-settings")
|
||||
|
||||
|
||||
class PrettyjsonCommand(sublime_plugin.TextCommand):
|
||||
""" Pretty Print JSON
|
||||
"""
|
||||
|
@ -14,7 +15,7 @@ class PrettyjsonCommand(sublime_plugin.TextCommand):
|
|||
selection = sublime.Region(0, self.view.size())
|
||||
else:
|
||||
selection = region
|
||||
|
||||
|
||||
try:
|
||||
obj = json.loads(self.view.substr(selection))
|
||||
self.view.replace(edit, selection, json.dumps(obj, indent=s.get("indent_size", 4), ensure_ascii=False, sort_keys=s.get("sort_keys", True)))
|
||||
|
|
Loading…
Reference in New Issue