Skip to content

Commit

Permalink
Merge pull request #166 from dkg/reproducible
Browse files Browse the repository at this point in the history
Make gzipped markdown source reproducible
  • Loading branch information
cabo committed Apr 10, 2022
2 parents 30a8ccf + 957cc90 commit 655f644
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/kramdown-rfc/gzip-clone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ def self.decompress(source)
end

# Compresses a string using gzip.
def self.compress(source, level=Zlib::DEFAULT_COMPRESSION, strategy=Zlib::DEFAULT_STRATEGY)
def self.compress(source, level=Zlib::DEFAULT_COMPRESSION, strategy=Zlib::DEFAULT_STRATEGY, mtime=0)
output = Stream.new
gz = Zlib::GzipWriter.new(output, level, strategy)
gz.mtime = mtime
gz.write(source)
gz.close
output.string
Expand Down

0 comments on commit 655f644

Please sign in to comment.