asciidoctor-diagram 2.2.2 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 629ba788527640ff6cd5bd7c0e6cc18a1a2b7afa4071737b667f95859491dbfc
4
- data.tar.gz: 762433ab8f23c6d7a4e44fc5d580c77a1fa52b56c47780d1ba28077ae1c309ee
3
+ metadata.gz: 2c2f34fcc568a14ae6c72579b4a9e8ef429cbc1b023ae9c20945084a212ad844
4
+ data.tar.gz: 7a11bdd3d63d22c3e472671b9a3e74ea3945edf80757350aaf6bfde690a9c392
5
5
  SHA512:
6
- metadata.gz: eb2cac4b23d86cc7fb37787208b221a42c839d06b31eff51585a108c674b0517e3c9c72afe1f4ed556e671d4ff5bff06c825cff764098a8925f860975e96146b
7
- data.tar.gz: 35a265251153d038515a89aea7322373495e6e72d768df42e200c517e905a6b257f8916b7c3b0ff8645a15a8aeff258b345bd7b744c6e514bd6dc7291bf26bdc
6
+ metadata.gz: ec745e7abc74b9ab114922de70fcc2fe01cd367cb60b1d47e90ee28ce120c7082400fa7d7176c2b0c9f47ea0a643a19dde64861d63460920b19e4157ff1aa706
7
+ data.tar.gz: 9bc01b94478a69b8782e5fe7c3ffffa95cc9dbdbbc5092f64f3dfc340f84bdc65d0cb62c72445fbb3dbcce12befe2f4d6011782542ade71681e2a9636393872d
data/CHANGELOG.adoc CHANGED
@@ -1,5 +1,12 @@
1
1
  = Asciidoctor-diagram Changelog
2
2
 
3
+ == 2.2.3
4
+
5
+ Enhancements::
6
+
7
+ * Issue #373: Add support for rendering Ditaa diagrams via PlantUML using ditaamini
8
+ * Issue #383: Allow bullet characters for Ditaa to be overridden
9
+
3
10
  == 2.2.2
4
11
 
5
12
  Enhancements::
@@ -253,6 +253,7 @@ No specific attributes.
253
253
  |debug |false |Renders the debug grid over the resulting image.
254
254
  |fixed-slope |false |Makes sides of parallelograms and trapezoids fixed slope instead of fixed width.
255
255
  |transparent |false |Makes the background of the image transparent instead of using the background color.
256
+ |bullet-characters|*o |The characters to recognize as bullets
256
257
  |===
257
258
 
258
259
  ==== Gnuplot
@@ -20,7 +20,8 @@ module Asciidoctor
20
20
  :shadows => lambda { |o, v| o << '--no-shadows' if v == 'false'},
21
21
  :debug => lambda { |o, v| o << '--debug' if v == 'true'},
22
22
  :fixed_slope => lambda { |o, v| o << '--fixed-slope' if v == 'true'},
23
- :transparent => lambda { |o, v| o << '--transparent' if v == 'true'}
23
+ :transparent => lambda { |o, v| o << '--transparent' if v == 'true'},
24
+ :bullet_characters => lambda { |o, v| o << '--bullet-characters' << v if v }
24
25
  }
25
26
 
26
27
  CLASSPATH_ENV = 'DIAGRAM_DITAA_CLASSPATH'
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Diagram
3
- VERSION = "2.2.2"
3
+ VERSION = "2.2.3"
4
4
  end
5
5
  end
data/spec/ditaa_spec.rb CHANGED
@@ -151,4 +151,41 @@ This should cause a bug.
151
151
  load_asciidoc doc
152
152
  }.to raise_error(/Ambiguous input/i)
153
153
  end
154
+
155
+ it "should support custom bullet characters" do
156
+ doc = <<-eos
157
+ = Hello, Ditaa!
158
+ Doc Writer <doc@example.com>
159
+
160
+ == First Section
161
+
162
+ [ditaa,format="svg",bullet-characters=x]
163
+ ----
164
+ +-----------------+
165
+ | o Things to do |
166
+ | cGRE |
167
+ | x Cut the grass |
168
+ | x Buy jam |
169
+ | x Fix car |
170
+ | x Make website |
171
+ +-----------------+
172
+ ----
173
+ eos
174
+
175
+ d = load_asciidoc doc
176
+ expect(d).to_not be_nil
177
+
178
+ b = d.find { |bl| bl.context == :image }
179
+ expect(b).to_not be_nil
180
+
181
+ expect(b.content_model).to eq :empty
182
+
183
+ target = b.attributes['target']
184
+ expect(target).to_not be_nil
185
+ expect(target).to match(/\.svg$/)
186
+ expect(File.exist?(target)).to be true
187
+
188
+ expect(b.attributes['width']).to_not be_nil
189
+ expect(b.attributes['height']).to_not be_nil
190
+ end
154
191
  end
@@ -393,6 +393,36 @@ salt
393
393
  expect(b.attributes['height']).to be_nil
394
394
  end
395
395
 
396
+ it 'should support ditaa diagrams' do
397
+ doc = <<-eos
398
+ = Hello, PlantUML!
399
+ Doc Writer <doc@example.com>
400
+
401
+ == First Section
402
+
403
+ [plantuml, format="png"]
404
+ ----
405
+ @startditaa -E
406
+ +---------+
407
+ | example |
408
+ +---------+
409
+ @endditaa
410
+ ----
411
+ eos
412
+
413
+ d = load_asciidoc doc, :attributes => {'backend' => 'docbook5'}
414
+ expect(d).to_not be_nil
415
+
416
+ b = d.find { |bl| bl.context == :image }
417
+ expect(b).to_not be_nil
418
+
419
+ target = b.attributes['target']
420
+ expect(File.exist?(target)).to be true
421
+
422
+ expect(b.attributes['width']).to be_nil
423
+ expect(b.attributes['height']).to be_nil
424
+ end
425
+
396
426
  it 'should handle embedded creole images correctly' do
397
427
  creole_doc = <<-eos
398
428
  = Hello, PlantUML!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-diagram
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pepijn Van Eeckhoudt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-08 00:00:00.000000000 Z
11
+ date: 2022-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler