fix: formatting

This commit is contained in:
TheSecEng 2020-04-14 14:09:35 -04:00
parent 700a842f50
commit 46cfff357e
No known key found for this signature in database
GPG Key ID: A7C3BA459E8C5C4E
1 changed files with 5 additions and 5 deletions

View File

@ -14,11 +14,11 @@ class PrettyJsonLintListener(sublime_plugin.EventListener, PrettyJsonBaseCommand
def on_post_save(self, view):
# will work only in json syntax and once validate_on_save setting is true
validate = s.get("validate_on_save", True)
if validate and "JSON" in view.settings().get('syntax'):
if validate and "JSON" in view.settings().get("syntax"):
self.view = view
self.view.erase_regions('json_errors')
self.view.erase_status('json_errors')
self.view.erase_regions("json_errors")
self.view.erase_status("json_errors")
json_content = self.view.substr(sublime.Region(0, view.size()))
@ -31,5 +31,5 @@ class PrettyJsonLintListener(sublime_plugin.EventListener, PrettyJsonBaseCommand
class PrettyJsonAutoPrettyOnSaveListener(sublime_plugin.EventListener):
def on_pre_save(self, view):
auto_pretty = s.get("pretty_on_save", False)
if auto_pretty and "JSON" in view.settings().get('syntax'):
sublime.active_window().run_command('pretty_json')
if auto_pretty and "JSON" in view.settings().get("syntax"):
sublime.active_window().run_command("pretty_json")