fix: formatting
This commit is contained in:
parent
ac99ee26aa
commit
fbf8f27b29
|
@ -186,7 +186,7 @@ class PrettyJsonBaseCommand:
|
||||||
stylesheet = sublime.load_resource("Packages/SublimePrettyJson/phantom.css")
|
stylesheet = sublime.load_resource("Packages/SublimePrettyJson/phantom.css")
|
||||||
return """<body id=inline-error>
|
return """<body id=inline-error>
|
||||||
<style>{}</style>
|
<style>{}</style>
|
||||||
<div class="{}"></div>
|
<div class="{}-arrow"></div>
|
||||||
<div class="{} container">
|
<div class="{} container">
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<a href="hide">×</a>
|
<a href="hide">×</a>
|
||||||
|
@ -472,14 +472,14 @@ class PrettyJsonGotoSymbolCommand(PrettyJsonBaseCommand, sublime_plugin.TextComm
|
||||||
if isinstance(json_data, OrderedDict):
|
if isinstance(json_data, OrderedDict):
|
||||||
for key in json_data:
|
for key in json_data:
|
||||||
new_key_name = root_key + "." + key
|
new_key_name = root_key + "." + key
|
||||||
self.items.append("%s" % new_key_name)
|
self.items.append("{}".format(new_key_name))
|
||||||
self.goto_items.append('"%s"' % key)
|
self.goto_items.append('"{}"'.format(key))
|
||||||
self.generate_items(json_data[key], new_key_name)
|
self.generate_items(json_data[key], new_key_name)
|
||||||
elif isinstance(json_data, list):
|
elif isinstance(json_data, list):
|
||||||
for index, item in enumerate(json_data):
|
for index, item in enumerate(json_data):
|
||||||
if isinstance(item, str):
|
if isinstance(item, str):
|
||||||
self.items.append("%s" % root_key + "." + item)
|
self.items.append("{}.{}".format(root_key, item))
|
||||||
self.goto_items.append('"%s"' % item)
|
self.goto_items.append('"{}"'.format(item))
|
||||||
|
|
||||||
def goto(self, pos):
|
def goto(self, pos):
|
||||||
string_to_search = self.goto_items[pos]
|
string_to_search = self.goto_items[pos]
|
||||||
|
|
|
@ -14,6 +14,11 @@ div.content {
|
||||||
div.content p {
|
div.content p {
|
||||||
margin: 0.2rem;
|
margin: 0.2rem;
|
||||||
}
|
}
|
||||||
|
div.content p.additional {
|
||||||
|
border-top: 1px solid color(var(--background) alpha(0.25));
|
||||||
|
margin-top: 0.7rem;
|
||||||
|
padding-top: 0.7rem;
|
||||||
|
}
|
||||||
div.toolbar {
|
div.toolbar {
|
||||||
padding: 0.2rem 0.7rem 0.2rem 0.7rem;
|
padding: 0.2rem 0.7rem 0.2rem 0.7rem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue