Merge pull request #81 from yukixz/fix-one-line-array
Sort matches before replacment on post process
This commit is contained in:
commit
7cf04726d2
|
@ -90,6 +90,7 @@ class PrettyJsonBaseCommand:
|
|||
if post_process:
|
||||
# find all array matches
|
||||
matches = re.findall(r"\[([^\[\]]+?)\]", output_json)
|
||||
matches.sort(key=len, reverse=True)
|
||||
join_separator = line_separator.ljust(2)
|
||||
for m in matches:
|
||||
items = [a.strip() for a in m.split(line_separator.strip())]
|
||||
|
|
Loading…
Reference in New Issue