Skip to content

Commit

Permalink
1.6.6: autolink-iref-cleanup, deterministic build
Browse files Browse the repository at this point in the history
No longer include mtime in the compressed markdown
(was PR #166)

See kramdown-rfc-autolink-iref-cleanup.rb:
Suppress auto-irefs inside the section that is also auto-linked
  • Loading branch information
cabo committed Apr 10, 2022
1 parent 78176c0 commit 6fb0225
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion kramdown-rfc.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spec = Gem::Specification.new do |s|
s.name = 'kramdown-rfc'
s.version = '1.6.5'
s.version = '1.6.6'
s.summary = "Kramdown extension for generating RFCXML (RFC 799x)."
s.description = %{An RFCXML (RFC 799x) generating backend for Thomas Leitner's
"kramdown" markdown parser. Mostly useful for RFC writers.}
Expand Down
4 changes: 2 additions & 2 deletions kramdown-rfc2629.gemspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
spec = Gem::Specification.new do |s|
s.name = 'kramdown-rfc2629'
s.version = '1.6.5'
s.version = '1.6.6'
s.summary = "Kramdown extension for generating RFCXML (RFC 799x)."
s.description = %{An RFCXML (RFC 799x) generating backend for Thomas Leitner's
"kramdown" markdown parser. Mostly useful for RFC writers.}
s.add_dependency('kramdown', '~> 2.3.0')
s.add_dependency('kramdown-parser-gfm', '~> 1.1')
s.add_dependency('certified', '~> 1.0')
s.add_dependency('json_pure', '~> 2.0')
s.files = Dir['lib/**/*.rb'] + %w(README.md LICENSE kramdown-rfc2629.gemspec bin/kdrfc bin/kramdown-rfc bin/kramdown-rfc2629 bin/doilit bin/kramdown-rfc-extract-markdown data/kramdown-rfc2629.erb data/encoding-fallbacks.txt data/math.json bin/kramdown-rfc-cache-subseries-bibxml bin/de-gfm)
s.files = Dir['lib/**/*.rb'] + %w(README.md LICENSE kramdown-rfc2629.gemspec bin/kdrfc bin/kramdown-rfc bin/kramdown-rfc2629 bin/doilit bin/kramdown-rfc-extract-markdown data/kramdown-rfc2629.erb data/encoding-fallbacks.txt data/math.json bin/kramdown-rfc-cache-subseries-bibxml bin/kramdown-rfc-autolink-iref-cleanup.rb bin/de-gfm)
s.require_path = 'lib'
s.executables = ['kramdown-rfc', 'kramdown-rfc2629', 'doilit', 'kramdown-rfc-extract-markdown',
'kdrfc', 'kramdown-rfc-cache-i-d-bibxml',
Expand Down
2 changes: 1 addition & 1 deletion lib/kramdown-rfc/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def xml_from_sections(input)
unless ENV["KRAMDOWN_NO_SOURCE"]
require 'kramdown-rfc/gzip-clone'
require 'base64'
compressed_input = Gzip.compress(input)
compressed_input = Gzip.compress_m0(input)
$source = Base64.encode64(compressed_input)
end

Expand Down
6 changes: 3 additions & 3 deletions lib/kramdown-rfc/gzip-clone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ def self.decompress(source)
Zlib::GzipReader.new(StringIO.new(source)).read
end

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

0 comments on commit 6fb0225

Please sign in to comment.