Sha256: 8c1c781dc9106e767b864b9e3972f4c86cd7824f5fb9075548f8bcaac42a933c
Contents?: true
Size: 411 Bytes
Versions: 118
Compression:
Stored size: 411 Bytes
Contents
module Pact module JRubySupport # Under jruby, JSON.pretty_generate inserts a blank new line between the opening and closing # brackets of an empty hash, like so: # { # "empty": { # # } # } # This screws up the UnixDiffFormatter, so we need to remove the blank lines. def fix_blank_lines_in_empty_hashes json json.gsub(/({\n)\n(\s*})/,'\1\2') end end end
Version data entries
118 entries across 118 versions & 3 rubygems