kramdown-plantuml 1.3.0 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/mergify.yml +7 -2
- data/.github/workflows/amend.yml +1 -1
- data/.github/workflows/no-java.yml +1 -1
- data/.github/workflows/no-plantuml.yml +1 -1
- data/.github/workflows/ruby.yml +20 -20
- data/README.md +1 -1
- data/bin/net/sourceforge/plantuml/plantuml/{1.2021.12/plantuml-1.2021.12.jar → 1.2022.6/plantuml-1.2022.6.jar} +0 -0
- data/lib/kramdown-plantuml/converter_extension.rb +32 -0
- data/lib/kramdown-plantuml/jekyll_provider.rb +6 -42
- data/lib/kramdown-plantuml/plantuml_diagram.rb +1 -1
- data/lib/kramdown-plantuml/theme.rb +3 -3
- data/lib/kramdown-plantuml/version.rb +1 -1
- data/lib/kramdown-plantuml.rb +0 -3
- data/lib/kramdown_html.rb +2 -42
- data/pom.xml +1 -1
- metadata +4 -4
- data/lib/kramdown-plantuml/jekyll_page_processor.rb +0 -103
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b755b8fc90e54aada29c40ce3b4391858d2b978487a82a9965bef5da8084b08
|
4
|
+
data.tar.gz: 0afb90a2bc66c705f7efb6e5c48d26c3e7e3ab83f1fd4ba2300090121b844958
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc479376cac81326afd561679f65d84ae110a762cf85ecd6936713f7dcaf019dbb7031890ea038dd4874955ffcdf7ca71fdca3ad30756d7526579cde89385d87
|
7
|
+
data.tar.gz: 605bcc56726601a048cc69599c0b8a72f6845cb1145af7549d35cb832b3aff515aae6dbf560294145509897b86ca698fde5848d21f34cc9230360a0f01517b9a
|
data/.github/mergify.yml
CHANGED
@@ -9,10 +9,15 @@ pull_request_rules:
|
|
9
9
|
- name: Automatic merge on approval
|
10
10
|
conditions:
|
11
11
|
- author~=^dependabot(|-preview)\[bot\]$
|
12
|
+
- '#commits-behind=0' # Only merge up to date pull requests
|
13
|
+
- check-success=test
|
14
|
+
- check-success=version
|
15
|
+
- check-success=plantuml
|
16
|
+
- check-success=gem
|
17
|
+
- check-success=shellcheck
|
18
|
+
- check-success=license/cla
|
12
19
|
actions:
|
13
20
|
merge:
|
14
|
-
method: merge
|
15
|
-
strict: smart
|
16
21
|
|
17
22
|
- name: Thank contributor
|
18
23
|
conditions:
|
data/.github/workflows/amend.yml
CHANGED
data/.github/workflows/ruby.yml
CHANGED
@@ -10,18 +10,18 @@ jobs:
|
|
10
10
|
version: ${{ steps.variables.outputs.version }}
|
11
11
|
|
12
12
|
steps:
|
13
|
-
- uses: actions/checkout@
|
13
|
+
- uses: actions/checkout@v3
|
14
14
|
with:
|
15
15
|
fetch-depth: 0
|
16
16
|
|
17
17
|
- name: Setup GitVersion
|
18
|
-
uses: gittools/actions/gitversion/setup@v0.9.
|
18
|
+
uses: gittools/actions/gitversion/setup@v0.9.13
|
19
19
|
with:
|
20
20
|
versionSpec: '5.x.x'
|
21
21
|
|
22
22
|
- name: Execute GitVersion
|
23
23
|
id: gitversion
|
24
|
-
uses: gittools/actions/gitversion/execute@v0.9.
|
24
|
+
uses: gittools/actions/gitversion/execute@v0.9.13
|
25
25
|
|
26
26
|
- name: Create variables
|
27
27
|
id: variables
|
@@ -34,16 +34,16 @@ jobs:
|
|
34
34
|
runs-on: ubuntu-latest
|
35
35
|
|
36
36
|
steps:
|
37
|
-
- uses: actions/checkout@
|
37
|
+
- uses: actions/checkout@v3
|
38
38
|
|
39
39
|
- name: Setup Java
|
40
|
-
uses: actions/setup-java@
|
40
|
+
uses: actions/setup-java@v3
|
41
41
|
with:
|
42
42
|
distribution: adopt
|
43
43
|
java-version: 14
|
44
44
|
|
45
45
|
- name: Cache Maven dependencies
|
46
|
-
uses: actions/cache@
|
46
|
+
uses: actions/cache@v3
|
47
47
|
with:
|
48
48
|
path: ~/.m2/repository
|
49
49
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
@@ -56,7 +56,7 @@ jobs:
|
|
56
56
|
run: mvn install
|
57
57
|
|
58
58
|
- name: Upload plantuml.jar artifact
|
59
|
-
uses: actions/upload-artifact@
|
59
|
+
uses: actions/upload-artifact@v3
|
60
60
|
with:
|
61
61
|
name: plantuml.jar
|
62
62
|
path: ~/.m2/repository/**/plantuml*.jar
|
@@ -69,9 +69,9 @@ jobs:
|
|
69
69
|
name: ${{ steps.gem.outputs.name }}
|
70
70
|
|
71
71
|
steps:
|
72
|
-
- uses: actions/checkout@
|
72
|
+
- uses: actions/checkout@v3
|
73
73
|
|
74
|
-
- uses: actions/download-artifact@
|
74
|
+
- uses: actions/download-artifact@v3
|
75
75
|
with:
|
76
76
|
name: plantuml.jar
|
77
77
|
path: bin/
|
@@ -97,7 +97,7 @@ jobs:
|
|
97
97
|
run: bundle exec rspec --format documentation --tag debug
|
98
98
|
|
99
99
|
- name: Upload code coverage (debug)
|
100
|
-
uses: actions/upload-artifact@
|
100
|
+
uses: actions/upload-artifact@v3
|
101
101
|
with:
|
102
102
|
name: rspec-debug-coverage
|
103
103
|
path: ./coverage
|
@@ -109,7 +109,7 @@ jobs:
|
|
109
109
|
run: bundle exec rake
|
110
110
|
|
111
111
|
- name: Upload code coverage
|
112
|
-
uses: actions/upload-artifact@
|
112
|
+
uses: actions/upload-artifact@v3
|
113
113
|
with:
|
114
114
|
name: rspec-coverage
|
115
115
|
path: ./coverage
|
@@ -125,7 +125,7 @@ jobs:
|
|
125
125
|
git checkout HEAD -- Gemfile
|
126
126
|
|
127
127
|
- name: Upload code coverage (Jekyll)
|
128
|
-
uses: actions/upload-artifact@
|
128
|
+
uses: actions/upload-artifact@v3
|
129
129
|
with:
|
130
130
|
name: rspec-jekyll-coverage
|
131
131
|
path: ./coverage
|
@@ -138,7 +138,7 @@ jobs:
|
|
138
138
|
run: .github/scripts/build-gem.sh --ref ${{ github.ref }} --verbose
|
139
139
|
|
140
140
|
- name: Upload gem
|
141
|
-
uses: actions/upload-artifact@
|
141
|
+
uses: actions/upload-artifact@v3
|
142
142
|
with:
|
143
143
|
name: ${{ steps.gem.outputs.name }}
|
144
144
|
path: ${{ steps.gem.outputs.name }}
|
@@ -150,7 +150,7 @@ jobs:
|
|
150
150
|
run: .github/scripts/test-gem.sh --workdir "${{ github.workspace }}/spec/examples" --gemdir "${{ github.workspace }}" --verbose
|
151
151
|
|
152
152
|
- name: Upload code coverage (gem)
|
153
|
-
uses: actions/upload-artifact@
|
153
|
+
uses: actions/upload-artifact@v3
|
154
154
|
with:
|
155
155
|
name: gem-coverage
|
156
156
|
path: ./coverage
|
@@ -166,15 +166,15 @@ jobs:
|
|
166
166
|
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]')
|
167
167
|
|
168
168
|
steps:
|
169
|
-
- uses: actions/checkout@
|
169
|
+
- uses: actions/checkout@v3
|
170
170
|
if: ${{ github.event_name != 'pull_request_target' }}
|
171
171
|
|
172
|
-
- uses: actions/checkout@
|
172
|
+
- uses: actions/checkout@v3
|
173
173
|
if: ${{ github.event_name == 'pull_request_target' }}
|
174
174
|
with:
|
175
175
|
ref: ${{ github.event.pull_request.head.sha }}
|
176
176
|
|
177
|
-
- uses: actions/download-artifact@
|
177
|
+
- uses: actions/download-artifact@v3
|
178
178
|
with:
|
179
179
|
name: ${{ needs.gem.outputs.name }}
|
180
180
|
|
@@ -200,7 +200,7 @@ jobs:
|
|
200
200
|
run: .github/scripts/test-gem.sh --workdir "${{ github.workspace }}/spec/examples" --version ${{ needs.version.outputs.version }} --token "${{ secrets.GPR_TOKEN }}" --verbose --theme-name c2a3b0 --theme-directory "${{ github.workspace }}/spec/examples"
|
201
201
|
|
202
202
|
- name: Upload Jekyll site
|
203
|
-
uses: actions/upload-artifact@
|
203
|
+
uses: actions/upload-artifact@v3
|
204
204
|
if: always()
|
205
205
|
with:
|
206
206
|
name: site
|
@@ -212,9 +212,9 @@ jobs:
|
|
212
212
|
if: startsWith(github.ref, 'refs/tags/') # Only publish tagged commits
|
213
213
|
|
214
214
|
steps:
|
215
|
-
- uses: actions/checkout@
|
215
|
+
- uses: actions/checkout@v3
|
216
216
|
|
217
|
-
- uses: actions/download-artifact@
|
217
|
+
- uses: actions/download-artifact@v3
|
218
218
|
with:
|
219
219
|
name: ${{ needs.gem.outputs.name }}
|
220
220
|
|
data/README.md
CHANGED
Binary file
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Kramdown
|
4
|
+
module PlantUml
|
5
|
+
# Plugs into Kramdown::Converter::Html to provide conversion of PlantUML markup
|
6
|
+
# into beautiful SVG.
|
7
|
+
module ConverterExtension
|
8
|
+
def convert_codeblock(element, indent)
|
9
|
+
return super(element, indent) unless plantuml? element
|
10
|
+
|
11
|
+
convert_plantuml(element.value)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def plantuml?(element)
|
17
|
+
element.attr['class'] == 'language-plantuml'
|
18
|
+
end
|
19
|
+
|
20
|
+
def convert_plantuml(plantuml)
|
21
|
+
puml_opts = PlantUml::Options.new(@options)
|
22
|
+
diagram = PlantUml::PlantUmlDiagram.new(plantuml, puml_opts)
|
23
|
+
diagram.svg.to_s
|
24
|
+
rescue StandardError => e
|
25
|
+
raise e if puml_opts.nil? || puml_opts.raise_errors?
|
26
|
+
|
27
|
+
logger = PlantUml::LogWrapper.init
|
28
|
+
logger.error "Error while converting diagram: #{e.inspect}"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -1,14 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative 'log_wrapper'
|
4
|
-
require_relative 'jekyll_page_processor'
|
5
4
|
|
6
5
|
module Kramdown
|
7
6
|
module PlantUml
|
8
7
|
# Provides an instance of Jekyll if available.
|
9
8
|
module JekyllProvider
|
10
9
|
class << self
|
11
|
-
attr_reader :
|
10
|
+
attr_reader :site_source_dir
|
12
11
|
|
13
12
|
def jekyll
|
14
13
|
return @jekyll if defined? @jekyll
|
@@ -16,52 +15,17 @@ module Kramdown
|
|
16
15
|
@jekyll = load_jekyll
|
17
16
|
end
|
18
17
|
|
19
|
-
def install
|
20
|
-
return @installed = false if jekyll.nil?
|
21
|
-
|
22
|
-
find_site_destination_dir
|
23
|
-
register_hook
|
24
|
-
@installed = true
|
25
|
-
end
|
26
|
-
|
27
|
-
def installed?
|
28
|
-
@installed
|
29
|
-
end
|
30
|
-
|
31
|
-
def needle(plantuml, options)
|
32
|
-
JekyllPageProcessor.needle(plantuml, options)
|
33
|
-
end
|
34
|
-
|
35
18
|
private
|
36
19
|
|
37
|
-
def
|
20
|
+
def find_site_source_dir
|
38
21
|
if jekyll.sites.nil? || jekyll.sites.empty?
|
39
|
-
logger.
|
22
|
+
logger.warn 'Jekyll detected, but no sites found.'
|
40
23
|
return nil
|
41
24
|
end
|
42
25
|
|
43
|
-
@
|
44
|
-
logger.debug "Jekyll detected,
|
45
|
-
@
|
46
|
-
end
|
47
|
-
|
48
|
-
def register_hook
|
49
|
-
Jekyll::Hooks.register :site, :post_write do |site|
|
50
|
-
site_post_write(site)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def site_post_write(site)
|
55
|
-
logger.debug 'Jekyll:site:post_write triggered.'
|
56
|
-
@site_destination_dir ||= site.dest
|
57
|
-
|
58
|
-
site.pages.each do |page|
|
59
|
-
processor = JekyllPageProcessor.new(page)
|
60
|
-
|
61
|
-
next unless processor.should_process?
|
62
|
-
|
63
|
-
processor.process(site.dest)
|
64
|
-
end
|
26
|
+
@site_source_dir = jekyll.sites.first.source
|
27
|
+
logger.debug "Jekyll detected, using '#{@site_source_dir}' as base directory."
|
28
|
+
@site_source_dir
|
65
29
|
end
|
66
30
|
|
67
31
|
def load_jekyll
|
@@ -18,7 +18,7 @@ module Kramdown
|
|
18
18
|
raise ArgumentError, 'options cannot be nil' if options.nil?
|
19
19
|
raise ArgumentError, "options must be a '#{Options}'." unless options.is_a?(Options)
|
20
20
|
|
21
|
-
@plantuml = plantuml
|
21
|
+
@plantuml = plantuml.strip unless plantuml.nil?
|
22
22
|
@options = options
|
23
23
|
@theme = Theme.new(options)
|
24
24
|
@logger = LogWrapper.init
|
@@ -35,9 +35,9 @@ module Kramdown
|
|
35
35
|
def resolve(directory)
|
36
36
|
jekyll = JekyllProvider
|
37
37
|
|
38
|
-
return directory if directory.nil? || directory.empty?
|
38
|
+
return directory if directory.nil? || directory.empty?
|
39
39
|
|
40
|
-
directory = File.absolute_path(directory, jekyll.
|
40
|
+
directory = File.absolute_path(directory, jekyll.site_source_dir)
|
41
41
|
|
42
42
|
log_or_raise "The theme directory '#{directory}' cannot be found" unless Dir.exist?(directory)
|
43
43
|
|
@@ -51,7 +51,7 @@ module Kramdown
|
|
51
51
|
def log_or_raise(message)
|
52
52
|
raise IOError, message if @raise_errors
|
53
53
|
|
54
|
-
logger.warn message
|
54
|
+
@logger.warn message
|
55
55
|
end
|
56
56
|
|
57
57
|
def theme(plantuml)
|
data/lib/kramdown-plantuml.rb
CHANGED
data/lib/kramdown_html.rb
CHANGED
@@ -6,46 +6,6 @@ require_relative 'kramdown-plantuml/log_wrapper'
|
|
6
6
|
require_relative 'kramdown-plantuml/plantuml_error'
|
7
7
|
require_relative 'kramdown-plantuml/options'
|
8
8
|
require_relative 'kramdown-plantuml/plantuml_diagram'
|
9
|
-
require_relative 'kramdown-plantuml/
|
9
|
+
require_relative 'kramdown-plantuml/converter_extension'
|
10
10
|
|
11
|
-
|
12
|
-
module Converter
|
13
|
-
# Plugs into Kramdown::Converter::Html to provide conversion of PlantUML markup
|
14
|
-
# into beautiful SVG.
|
15
|
-
class Html
|
16
|
-
alias super_convert_codeblock convert_codeblock
|
17
|
-
|
18
|
-
def convert_codeblock(element, indent)
|
19
|
-
return super_convert_codeblock(element, indent) unless plantuml?(element)
|
20
|
-
|
21
|
-
jekyll = ::Kramdown::PlantUml::JekyllProvider
|
22
|
-
|
23
|
-
# If Jekyll is successfully loaded, we'll wait with converting the
|
24
|
-
# PlantUML diagram to SVG since a theme may be configured that needs to
|
25
|
-
# be copied to the assets directory before the PlantUML conversion can
|
26
|
-
# be performed. We therefore place a needle in the haystack that we will
|
27
|
-
# convert in the :site:pre_render hook.
|
28
|
-
options = ::Kramdown::PlantUml::Options.new(@options)
|
29
|
-
return jekyll.needle(element.value, options) if jekyll.installed?
|
30
|
-
|
31
|
-
convert_plantuml(element.value, options)
|
32
|
-
end
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
def plantuml?(element)
|
37
|
-
element.attr['class'] == 'language-plantuml'
|
38
|
-
end
|
39
|
-
|
40
|
-
def convert_plantuml(plantuml, options)
|
41
|
-
diagram = ::Kramdown::PlantUml::PlantUmlDiagram.new(plantuml, options)
|
42
|
-
diagram.svg.to_s
|
43
|
-
rescue StandardError => e
|
44
|
-
raise e if options.raise_errors?
|
45
|
-
|
46
|
-
logger = ::Kramdown::PlantUml::LogWrapper.init
|
47
|
-
logger.error "Error while replacing needle: #{e.inspect}"
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
11
|
+
Kramdown::Converter::Html.prepend Kramdown::PlantUml::ConverterExtension
|
data/pom.xml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kramdown-plantuml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swedbank Pay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -194,13 +194,13 @@ files:
|
|
194
194
|
- LICENSE
|
195
195
|
- README.md
|
196
196
|
- Rakefile
|
197
|
-
- bin/net/sourceforge/plantuml/plantuml/1.
|
197
|
+
- bin/net/sourceforge/plantuml/plantuml/1.2022.6/plantuml-1.2022.6.jar
|
198
198
|
- kramdown-plantuml.gemspec
|
199
199
|
- lib/kramdown-plantuml.rb
|
200
200
|
- lib/kramdown-plantuml/bool_env.rb
|
201
201
|
- lib/kramdown-plantuml/console_logger.rb
|
202
|
+
- lib/kramdown-plantuml/converter_extension.rb
|
202
203
|
- lib/kramdown-plantuml/executor.rb
|
203
|
-
- lib/kramdown-plantuml/jekyll_page_processor.rb
|
204
204
|
- lib/kramdown-plantuml/jekyll_provider.rb
|
205
205
|
- lib/kramdown-plantuml/log_wrapper.rb
|
206
206
|
- lib/kramdown-plantuml/none_s.rb
|
@@ -1,103 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'htmlentities'
|
4
|
-
require 'json'
|
5
|
-
require_relative 'log_wrapper'
|
6
|
-
|
7
|
-
module Kramdown
|
8
|
-
module PlantUml
|
9
|
-
# Processes Jekyll pages.
|
10
|
-
class JekyllPageProcessor
|
11
|
-
PROCESSED_KEY = :kramdown_plantuml_processed
|
12
|
-
|
13
|
-
def initialize(page)
|
14
|
-
raise ArgumentError, 'page cannot be nil' if page.nil?
|
15
|
-
|
16
|
-
@page = page
|
17
|
-
end
|
18
|
-
|
19
|
-
def process(site_destination_directory)
|
20
|
-
@page.output = do_process
|
21
|
-
@page.data[PROCESSED_KEY] = true
|
22
|
-
@page.write(site_destination_directory)
|
23
|
-
end
|
24
|
-
|
25
|
-
def should_process?
|
26
|
-
return false unless @page.output_ext == '.html'
|
27
|
-
|
28
|
-
if !@page.data.nil? && @page.data.key?(PROCESSED_KEY) && @page.data[PROCESSED_KEY]
|
29
|
-
logger.debug "Skipping #{@page.path} because it has already been processed."
|
30
|
-
return false
|
31
|
-
end
|
32
|
-
|
33
|
-
true
|
34
|
-
end
|
35
|
-
|
36
|
-
class << self
|
37
|
-
def needle(plantuml, options)
|
38
|
-
hash = { 'plantuml' => plantuml, 'options' => options.to_h }
|
39
|
-
|
40
|
-
<<~NEEDLE
|
41
|
-
<!--#kramdown-plantuml.start#-->
|
42
|
-
#{hash.to_json}
|
43
|
-
<!--#kramdown-plantuml.end#-->
|
44
|
-
NEEDLE
|
45
|
-
rescue StandardError => e
|
46
|
-
raise e if options.nil? || options.raise_errors?
|
47
|
-
|
48
|
-
logger.error 'Error while placing needle.'
|
49
|
-
logger.error e.to_s
|
50
|
-
logger.debug_multiline plantuml
|
51
|
-
end
|
52
|
-
|
53
|
-
def logger
|
54
|
-
@logger ||= ::Kramdown::PlantUml::LogWrapper.init
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
private
|
59
|
-
|
60
|
-
def do_process
|
61
|
-
logger.debug "Replacing Jekyll needles in #{@page.path}"
|
62
|
-
|
63
|
-
html = @page.output
|
64
|
-
|
65
|
-
return html if html.nil? || html.empty? || !html.is_a?(String)
|
66
|
-
|
67
|
-
html.gsub(/<!--#kramdown-plantuml\.start#-->(?<json>.*?)<!--#kramdown-plantuml\.end#-->/m) do
|
68
|
-
json = $LAST_MATCH_INFO ? $LAST_MATCH_INFO[:json] : nil
|
69
|
-
replace_needle(json) unless json.nil?
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
def replace_needle(json)
|
74
|
-
logger.debug 'Replacing Jekyll needle.'
|
75
|
-
|
76
|
-
needle_hash = JSON.parse(json)
|
77
|
-
options_hash = needle_hash['options']
|
78
|
-
options = ::Kramdown::PlantUml::Options.new({ plantuml: options_hash })
|
79
|
-
|
80
|
-
begin
|
81
|
-
decode_and_convert(needle_hash, options)
|
82
|
-
rescue StandardError => e
|
83
|
-
raise e if options.raise_errors?
|
84
|
-
|
85
|
-
logger.error 'Error while replacing Jekyll needle.'
|
86
|
-
logger.error e.to_s
|
87
|
-
logger.debug_multiline json
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
def decode_and_convert(hash, options)
|
92
|
-
encoded_plantuml = hash['plantuml']
|
93
|
-
plantuml = HTMLEntities.new.decode encoded_plantuml
|
94
|
-
diagram = ::Kramdown::PlantUml::PlantUmlDiagram.new(plantuml, options)
|
95
|
-
diagram.svg
|
96
|
-
end
|
97
|
-
|
98
|
-
def logger
|
99
|
-
@logger ||= ::Kramdown::PlantUml::LogWrapper.init
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|