Skip to content

Commit

Permalink
Fix Kroki diagram rendering in preview which broke in release 0.41.10 (
Browse files Browse the repository at this point in the history
  • Loading branch information
ahus1 committed Mar 26, 2024
1 parent 0e9b4bc commit 91505cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ This document provides a high-level view of the changes introduced by release.
[[releasenotes]]
== Release notes

=== 0.41.12

- Fix Kroki diagram rendering in preview which broke in release 0.41.10 (#1585)

=== 0.41.11

- Capture AssertionError thrown when rendering PlantUML content (#1578)
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/kroki-extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def get_diagram_uri(server_url)
end

def encode
Base64.urlsafe_encode64(Zlib::Deflate.deflate(@text, 9))
([Zlib::Deflate.deflate(@text, 9)].pack 'm0').tr '+/', '-_'
end

def save(output_dir_path, kroki_client)
Expand Down Expand Up @@ -400,7 +400,7 @@ class KrokiHttpClient
require 'json'

class << self
REFERER = "asciidoctor/kroki.rb/0.9.1-intellij"
REFERER = "asciidoctor/kroki.rb/0.10.0-intellij"

def get(uri, opts, _)
uri = URI(uri)
Expand Down

0 comments on commit 91505cf

Please sign in to comment.