moving max line length into config so people can change it
This commit is contained in:
parent
56145e950c
commit
a054124590
|
@ -5,5 +5,6 @@
|
|||
"ensure_ascii": false,
|
||||
"line_separator": ",",
|
||||
"value_separator": ": ",
|
||||
"keep_arrays_single_line": false
|
||||
"keep_arrays_single_line": false,
|
||||
"max_arrays_line_length": 120
|
||||
}
|
|
@ -90,7 +90,7 @@ class PrettyJsonBaseCommand(sublime_plugin.TextCommand):
|
|||
items = [a.strip() for a in m.split(line_separator.strip())]
|
||||
replacement = join_separator.join(items)
|
||||
# if line not gets too long, replace with single line
|
||||
if len(replacement) <= 120:
|
||||
if len(replacement) <= s.get("max_arrays_line_length", 120):
|
||||
output_json = output_json.replace(m, replacement)
|
||||
|
||||
return output_json
|
||||
|
|
Loading…
Reference in New Issue