asciidoctor-diagram 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +7 -0
- data/docs/modules/ROOT/partials/advanced.adoc +1 -0
- data/lib/asciidoctor-diagram/ditaa/converter.rb +2 -1
- data/lib/asciidoctor-diagram/version.rb +1 -1
- data/spec/ditaa_spec.rb +37 -0
- data/spec/plantuml_spec.rb +30 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c2f34fcc568a14ae6c72579b4a9e8ef429cbc1b023ae9c20945084a212ad844
|
4
|
+
data.tar.gz: 7a11bdd3d63d22c3e472671b9a3e74ea3945edf80757350aaf6bfde690a9c392
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec745e7abc74b9ab114922de70fcc2fe01cd367cb60b1d47e90ee28ce120c7082400fa7d7176c2b0c9f47ea0a643a19dde64861d63460920b19e4157ff1aa706
|
7
|
+
data.tar.gz: 9bc01b94478a69b8782e5fe7c3ffffa95cc9dbdbbc5092f64f3dfc340f84bdc65d0cb62c72445fbb3dbcce12befe2f4d6011782542ade71681e2a9636393872d
|
data/CHANGELOG.adoc
CHANGED
@@ -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'
|
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
|
data/spec/plantuml_spec.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2022-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|