Skip to content

Commit 3a25e9b

Browse files
committed
make state JSON pretty formatted
1 parent a381b43 commit 3a25e9b

File tree

3 files changed

+47892
-5
lines changed

3 files changed

+47892
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ _site
33
*.un~
44
Gemfile.lock
55
/.jekyll-metadata
6+
/tmp/

scripts/vimmagazinestate.json

Lines changed: 47887 additions & 1 deletion
Large diffs are not rendered by default.

scripts/vimmagazinetools.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def cmd_githubissuelist(args)
269269

270270

271271
def cmd_scriptjson(_args)
272-
puts JSON.dump(vimscript_all())
272+
puts JSON.pretty_generate(vimscript_all())
273273
end
274274

275275

@@ -361,9 +361,9 @@ def cmd_generate(args)
361361
}
362362

363363
if args["update"]
364-
open(args["statefile"], "w") {|f|
365-
JSON.dump(newstate, f)
366-
}
364+
open(args["statefile"], "w") do |f|
365+
f.write JSON.pretty_generate(newstate)
366+
end
367367
end
368368
end
369369

0 commit comments

Comments
 (0)