Commit 6fed4663 authored by Daisuke Fujita's avatar Daisuke Fujita

Merge pull request #111 from dtan4/modify-prettify-policy

Consider unescape option in #prettify_policy
parents 62ffddb3 c8862d57
......@@ -18,7 +18,7 @@ module Terraforming
def prettify_policy(document, breakline: false, unescape: false)
json = JSON.pretty_generate(JSON.parse(CGI.unescape(document)))
json = JSON.pretty_generate(JSON.parse(unescape ? CGI.unescape(document) : document))
if breakline
json[-1] != "\n" ? json << "\n" : json
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment