Skip to content

Commit

Permalink
#424 Avoid using : in filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
pepijnve committed Jul 31, 2023
1 parent bc2099c commit 1b1ab39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
= Asciidoctor-diagram Changelog

== 2.2.11

Bugfixes::

* Issue #424: avoid invalid filename characters on Windows

== 2.2.10

Enhancements::
Expand Down
4 changes: 2 additions & 2 deletions lib/asciidoctor-diagram/diagram_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def create_image_metadata
end

def checksum
@checksum ||= "#{config[:type]}:#{compute_checksum(code)}"
@checksum ||= "#{diagram_type.to_s}-#{compute_checksum(code)}"
end

protected
Expand All @@ -248,7 +248,7 @@ def compute_checksum(code)
md5 << k.to_s if k
md5 << v.to_s if v
end
"md5:#{md5.hexdigest}"
"md5-#{md5.hexdigest}"
end
end

Expand Down

0 comments on commit 1b1ab39

Please sign in to comment.