asciidoctor-diagram 2.0.2 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +78 -1
  3. data/README.adoc +25 -507
  4. data/Rakefile +1 -1
  5. data/docs/antora.yml +3 -0
  6. data/{images → docs/modules/ROOT/images}/asciidoctor-diagram-classes.png +0 -0
  7. data/docs/modules/ROOT/images/asciidoctor-diagram-process.png +0 -0
  8. data/docs/modules/ROOT/pages/index.adoc +21 -0
  9. data/docs/modules/ROOT/partials/advanced.adoc +319 -0
  10. data/docs/modules/ROOT/partials/create_diagram.adoc +132 -0
  11. data/docs/modules/ROOT/partials/generate.adoc +15 -0
  12. data/docs/modules/ROOT/partials/installation.adoc +19 -0
  13. data/docs/modules/ROOT/partials/uris.adoc +40 -0
  14. data/examples/features.adoc +1 -1
  15. data/lib/asciidoctor-diagram.rb +4 -0
  16. data/lib/asciidoctor-diagram/a2s/converter.rb +10 -6
  17. data/lib/asciidoctor-diagram/blockdiag/converter.rb +1 -1
  18. data/lib/asciidoctor-diagram/bpmn/converter.rb +3 -3
  19. data/lib/asciidoctor-diagram/diagram_converter.rb +9 -1
  20. data/lib/asciidoctor-diagram/diagram_processor.rb +92 -48
  21. data/lib/asciidoctor-diagram/diagram_source.rb +71 -24
  22. data/lib/asciidoctor-diagram/diagrams.rb +7 -0
  23. data/lib/asciidoctor-diagram/diagrams/converter.rb +49 -0
  24. data/lib/asciidoctor-diagram/diagrams/extension.rb +14 -0
  25. data/lib/asciidoctor-diagram/ditaa/converter.rb +20 -7
  26. data/lib/asciidoctor-diagram/ditaa/ditaa-1.3.20.jar +0 -0
  27. data/lib/asciidoctor-diagram/dpic.rb +7 -0
  28. data/lib/asciidoctor-diagram/dpic/converter.rb +30 -0
  29. data/lib/asciidoctor-diagram/dpic/extension.rb +14 -0
  30. data/lib/asciidoctor-diagram/gnuplot/converter.rb +8 -8
  31. data/lib/asciidoctor-diagram/graphviz/converter.rb +2 -2
  32. data/lib/asciidoctor-diagram/http/converter.rb +52 -14
  33. data/lib/asciidoctor-diagram/http/server.rb +11 -6
  34. data/lib/asciidoctor-diagram/lilypond/converter.rb +13 -3
  35. data/lib/asciidoctor-diagram/meme/converter.rb +22 -16
  36. data/lib/asciidoctor-diagram/mermaid/converter.rb +45 -14
  37. data/lib/asciidoctor-diagram/msc/converter.rb +2 -2
  38. data/lib/asciidoctor-diagram/pikchr.rb +7 -0
  39. data/lib/asciidoctor-diagram/pikchr/converter.rb +33 -0
  40. data/lib/asciidoctor-diagram/pikchr/extension.rb +14 -0
  41. data/lib/asciidoctor-diagram/plantuml/converter.rb +68 -43
  42. data/lib/asciidoctor-diagram/plantuml/plantuml-1.3.20.jar +0 -0
  43. data/lib/asciidoctor-diagram/smcat/converter.rb +3 -3
  44. data/lib/asciidoctor-diagram/svgbob/converter.rb +6 -2
  45. data/lib/asciidoctor-diagram/symbolator.rb +7 -0
  46. data/lib/asciidoctor-diagram/symbolator/converter.rb +23 -0
  47. data/lib/asciidoctor-diagram/symbolator/extension.rb +14 -0
  48. data/lib/asciidoctor-diagram/syntrax/converter.rb +9 -6
  49. data/lib/asciidoctor-diagram/tikz/converter.rb +20 -1
  50. data/lib/asciidoctor-diagram/umlet/converter.rb +11 -2
  51. data/lib/asciidoctor-diagram/util/cli.rb +16 -1
  52. data/lib/asciidoctor-diagram/util/cli_generator.rb +30 -8
  53. data/lib/asciidoctor-diagram/util/gif.rb +2 -2
  54. data/lib/asciidoctor-diagram/util/java.rb +118 -3
  55. data/lib/asciidoctor-diagram/util/java_jruby.rb +4 -1
  56. data/lib/asciidoctor-diagram/util/java_socket.rb +8 -109
  57. data/lib/asciidoctor-diagram/util/pdf.rb +2 -2
  58. data/lib/asciidoctor-diagram/util/png.rb +2 -2
  59. data/lib/{server-1.3.15.jar → asciidoctor-diagram/util/server-1.3.20.jar} +0 -0
  60. data/lib/asciidoctor-diagram/util/svg.rb +66 -18
  61. data/lib/asciidoctor-diagram/vega/converter.rb +2 -2
  62. data/lib/asciidoctor-diagram/version.rb +1 -1
  63. data/spec/a2s_spec.rb +6 -144
  64. data/spec/blockdiag_spec.rb +6 -204
  65. data/spec/bpmn_spec.rb +52 -92
  66. data/spec/bytefield_spec.rb +6 -144
  67. data/spec/diagrams_spec.rb +23 -0
  68. data/spec/ditaa_spec.rb +6 -144
  69. data/spec/dpic_spec.rb +19 -0
  70. data/spec/erd_spec.rb +6 -203
  71. data/spec/gnuplot_spec.rb +10 -263
  72. data/spec/graphviz_spec.rb +6 -145
  73. data/spec/lilypond_spec.rb +6 -144
  74. data/spec/mermaid_spec.rb +69 -211
  75. data/spec/msc_spec.rb +6 -203
  76. data/spec/nomnoml_spec.rb +7 -145
  77. data/spec/pikchr_spec.rb +69 -0
  78. data/spec/plantuml_spec.rb +63 -553
  79. data/spec/shaape_spec.rb +12 -224
  80. data/spec/shared_examples.rb +603 -0
  81. data/spec/smcat_spec.rb +6 -144
  82. data/spec/svgbob_spec.rb +6 -144
  83. data/spec/symbolator_spec.rb +23 -0
  84. data/spec/syntrax_spec.rb +7 -217
  85. data/spec/test_helper.rb +4 -29
  86. data/spec/tikz_spec.rb +68 -18
  87. data/spec/umlet_spec.rb +3 -59
  88. data/spec/vega_spec.rb +6 -119
  89. data/spec/wavedrom_spec.rb +3 -200
  90. metadata +82 -18
  91. data/README_zh-CN.adoc +0 -336
  92. data/images/asciidoctor-diagram-process.png +0 -0
  93. data/lib/batik-all-1.10.jar +0 -0
  94. data/lib/ditaa-1.3.15.jar +0 -0
  95. data/lib/ditaamini-0.12.jar +0 -0
  96. data/lib/jlatexmath-minimal-1.0.5.jar +0 -0
  97. data/lib/plantuml-1.3.15.jar +0 -0
  98. data/lib/plantuml.jar +0 -0
  99. data/spec/bpmn-example.xml +0 -44
data/spec/dpic_spec.rb ADDED
@@ -0,0 +1,19 @@
1
+ require_relative 'test_helper'
2
+
3
+ DPIC_CODE = <<-eos
4
+ arrow "$u$" above
5
+ S: circle rad 10/72.27 # 10 pt
6
+ line right 0.35
7
+ G: box "$G(s)$"
8
+ arrow "$y$" above
9
+ line -> down G.ht from last arrow then left last arrow.c.x-S.x then to S.s
10
+ "$-\;$" below rjust
11
+ eos
12
+
13
+ describe Asciidoctor::Diagram::DpicBlockMacroProcessor, :broken_on_windows do
14
+ include_examples "block_macro", :dpic, DPIC_CODE, [:svg]
15
+ end
16
+
17
+ describe Asciidoctor::Diagram::DpicBlockProcessor, :broken_on_windows do
18
+ include_examples "block", :dpic, DPIC_CODE, [:svg]
19
+ end
data/spec/erd_spec.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require_relative 'test_helper'
2
2
 
3
- code = <<-eos
3
+ ERD_CODE = <<-eos
4
4
  title {label: "nfldb Entity-Relationship diagram (condensed)", size: "20"}
5
5
 
6
6
  # Entities
@@ -83,207 +83,10 @@ play 1--* play_player
83
83
  player 1--* play_player
84
84
  eos
85
85
 
86
- describe Asciidoctor::Diagram::ErdBlockMacroProcessor, :broken_on_travis, :broken_on_windows do
87
- it "should generate PNG images when format is set to 'png'" do
88
- File.write('erd.txt', code)
89
-
90
- doc = <<-eos
91
- = Hello, Erd!
92
- Doc Writer <doc@example.com>
93
-
94
- == First Section
95
-
96
- erd::erd.txt[format="png"]
97
- eos
98
-
99
- d = load_asciidoc doc
100
- expect(d).to_not be_nil
101
-
102
- b = d.find { |bl| bl.context == :image }
103
- expect(b).to_not be_nil
104
-
105
- expect(b.content_model).to eq :empty
106
-
107
- target = b.attributes['target']
108
- expect(target).to_not be_nil
109
- expect(target).to match(/\.png$/)
110
- expect(File.exist?(target)).to be true
111
-
112
- expect(b.attributes['width']).to_not be_nil
113
- expect(b.attributes['height']).to_not be_nil
114
- end
115
-
116
- it "should generate SVG images when format is set to 'svg'" do
117
- File.write('erd.txt', code)
118
-
119
- doc = <<-eos
120
- = Hello, Erd!
121
- Doc Writer <doc@example.com>
122
-
123
- == First Section
124
-
125
- erd::erd.txt[format="svg"]
126
- eos
127
-
128
- d = load_asciidoc doc
129
- expect(d).to_not be_nil
130
-
131
- b = d.find { |bl| bl.context == :image }
132
- expect(b).to_not be_nil
133
-
134
- expect(b.content_model).to eq :empty
135
-
136
- target = b.attributes['target']
137
- expect(target).to_not be_nil
138
- expect(target).to match(/\.svg/)
139
- expect(File.exist?(target)).to be true
140
-
141
- expect(b.attributes['width']).to_not be_nil
142
- expect(b.attributes['height']).to_not be_nil
143
- end
86
+ describe Asciidoctor::Diagram::ErdBlockMacroProcessor, :broken_on_windows do
87
+ include_examples "block_macro", :erd, ERD_CODE, [:png, :svg]
144
88
  end
145
89
 
146
- describe Asciidoctor::Diagram::ErdBlockProcessor, :broken_on_travis, :broken_on_windows do
147
- it "should generate PNG images when format is set to 'png'" do
148
- doc = <<-eos
149
- = Hello, Erd!
150
- Doc Writer <doc@example.com>
151
-
152
- == First Section
153
-
154
- [erd, format="png"]
155
- ----
156
- #{code}
157
- ----
158
- eos
159
-
160
- d = load_asciidoc doc
161
- expect(d).to_not be_nil
162
-
163
- b = d.find { |bl| bl.context == :image }
164
- expect(b).to_not be_nil
165
-
166
- expect(b.content_model).to eq :empty
167
-
168
- target = b.attributes['target']
169
- expect(target).to_not be_nil
170
- expect(target).to match(/\.png$/)
171
- expect(File.exist?(target)).to be true
172
-
173
- expect(b.attributes['width']).to_not be_nil
174
- expect(b.attributes['height']).to_not be_nil
175
- end
176
-
177
- it "should generate SVG images when format is set to 'svg'" do
178
- doc = <<-eos
179
- = Hello, Erd!
180
- Doc Writer <doc@example.com>
181
-
182
- == First Section
183
-
184
- [erd, format="svg"]
185
- ----
186
- #{code}
187
- ----
188
- eos
189
-
190
- d = load_asciidoc doc
191
- expect(d).to_not be_nil
192
-
193
- b = d.find { |bl| bl.context == :image }
194
- expect(b).to_not be_nil
195
-
196
- expect(b.content_model).to eq :empty
197
-
198
- target = b.attributes['target']
199
- expect(target).to_not be_nil
200
- expect(target).to match(/\.svg/)
201
- expect(File.exist?(target)).to be true
202
-
203
- expect(b.attributes['width']).to_not be_nil
204
- expect(b.attributes['height']).to_not be_nil
205
- end
206
-
207
- it "should raise an error when when format is set to an invalid value" do
208
- doc = <<-eos
209
- = Hello, Erd!
210
- Doc Writer <doc@example.com>
211
-
212
- == First Section
213
-
214
- [erd, format="foobar"]
215
- ----
216
- ----
217
- eos
218
-
219
- expect { load_asciidoc doc }.to raise_error(/support.*format/i)
220
- end
221
-
222
- it "should not regenerate images when source has not changed" do
223
- File.write('erd.txt', code)
224
-
225
- doc = <<-eos
226
- = Hello, Erd!
227
- Doc Writer <doc@example.com>
228
-
229
- == First Section
230
-
231
- erd::erd.txt
232
-
233
- [erd, format="png"]
234
- ----
235
- #{code}
236
- ----
237
- eos
238
-
239
- d = load_asciidoc doc
240
- b = d.find { |bl| bl.context == :image }
241
- expect(b).to_not be_nil
242
- target = b.attributes['target']
243
- mtime1 = File.mtime(target)
244
-
245
- sleep 1
246
-
247
- d = load_asciidoc doc
248
-
249
- mtime2 = File.mtime(target)
250
-
251
- expect(mtime2).to eq mtime1
252
- end
253
-
254
- it "should handle two block macros with the same source" do
255
- File.write('erd.txt', code)
256
-
257
- doc = <<-eos
258
- = Hello, Erd!
259
- Doc Writer <doc@example.com>
260
-
261
- == First Section
262
-
263
- erd::erd.txt[]
264
- erd::erd.txt[]
265
- eos
266
-
267
- load_asciidoc doc
268
- expect(File.exist?('erd.png')).to be true
269
- end
270
-
271
- it "should respect target attribute in block macros" do
272
- File.write('erd.txt', code)
273
-
274
- doc = <<-eos
275
- = Hello, Erd!
276
- Doc Writer <doc@example.com>
277
-
278
- == First Section
279
-
280
- erd::erd.txt["foobar"]
281
- erd::erd.txt["foobaz"]
282
- eos
283
-
284
- load_asciidoc doc
285
- expect(File.exist?('foobar.png')).to be true
286
- expect(File.exist?('foobaz.png')).to be true
287
- expect(File.exist?('erd.png')).to be false
288
- end
289
- end
90
+ describe Asciidoctor::Diagram::ErdBlockProcessor, :broken_on_windows do
91
+ include_examples "block", :erd, ERD_CODE, [:png, :svg]
92
+ end
data/spec/gnuplot_spec.rb CHANGED
@@ -1,269 +1,16 @@
1
1
  require_relative 'test_helper'
2
2
 
3
- code = <<-eos
3
+ GNUPLOT_CODE = <<-eos
4
4
  plot [0:5][0:20] x**2 title 'O(n^2)'
5
5
  eos
6
6
 
7
7
  describe Asciidoctor::Diagram::GnuplotBlockMacroProcessor do
8
- it "should generate PNG images when format is set to 'png'" do
9
- File.write('gnuplot.txt', code)
10
-
11
- doc = <<-eos
12
- = Hello, Gnuplot!
13
- Doc Writer <doc@example.com>
14
-
15
- == First Section
16
-
17
- gnuplot::gnuplot.txt[format="png"]
18
- eos
19
-
20
- d = load_asciidoc doc
21
- expect(d).to_not be_nil
22
-
23
- b = d.find { |bl| bl.context == :image }
24
- expect(b).to_not be_nil
25
-
26
- expect(b.content_model).to eq :empty
27
-
28
- target = b.attributes['target']
29
- expect(target).to_not be_nil
30
- expect(target).to match(/\.png$/)
31
- expect(File.exist?(target)).to be true
32
-
33
- expect(b.attributes['width']).to_not be_nil
34
- expect(b.attributes['height']).to_not be_nil
35
- end
36
-
37
-
38
- it "should generate SVG images when format is set to 'svg'" do
39
- File.write('gnuplot.txt', code)
40
-
41
- doc = <<-eos
42
- = Hello, Gnuplot!
43
- Doc Writer <doc@example.com>
44
-
45
- == First Section
46
-
47
- gnuplot::gnuplot.txt[format="svg"]
48
- eos
49
-
50
- d = load_asciidoc doc
51
- expect(d).to_not be_nil
52
-
53
- b = d.find { |bl| bl.context == :image }
54
- expect(b).to_not be_nil
55
-
56
- expect(b.content_model).to eq :empty
57
-
58
- target = b.attributes['target']
59
- expect(target).to_not be_nil
60
- expect(target).to match(/\.svg/)
61
- expect(File.exist?(target)).to be true
62
-
63
- expect(b.attributes['width']).to_not be_nil
64
- expect(b.attributes['height']).to_not be_nil
65
- end
66
-
67
- it "should generate GIF images when format is set to 'gif'" do
68
- File.write('gnuplot.txt', code)
69
-
70
- doc = <<-eos
71
- = Hello, Gnuplot!
72
- Doc Writer <doc@example.com>
73
-
74
- == First Section
75
-
76
- gnuplot::gnuplot.txt[format="gif"]
77
- eos
78
-
79
- d = load_asciidoc doc
80
- expect(d).to_not be_nil
81
-
82
- b = d.find { |bl| bl.context == :image }
83
- expect(b).to_not be_nil
84
-
85
- expect(b.content_model).to eq :empty
86
-
87
- target = b.attributes['target']
88
- expect(target).to_not be_nil
89
- expect(target).to match(/\.gif$/)
90
- expect(File.exist?(target)).to be true
91
-
92
- expect(b.attributes['width']).to_not be_nil
93
- expect(b.attributes['height']).to_not be_nil
94
- end
95
-
96
-
97
- it "should generate literal blocks when format is set to 'txt'" do
98
- doc = <<-eos
99
- = Hello, Gnuplot!
100
- Doc Writer <doc@example.com>
101
-
102
- == First Section
103
-
104
- [gnuplot, format="txt"]
105
- ----
106
- #{code}
107
- ----
108
- eos
109
-
110
- d = load_asciidoc doc
111
- expect(d).to_not be_nil
112
-
113
- b = d.find { |bl| bl.context == :literal }
114
- expect(b).to_not be_nil
115
-
116
- expect(b.content_model).to eq :verbatim
117
-
118
- expect(b.attributes['target']).to be_nil
119
- end
120
-
121
-
8
+ include_examples "block_macro", :gnuplot, GNUPLOT_CODE, [:png, :svg, :gif, :txt]
122
9
  end
123
10
 
124
11
  describe Asciidoctor::Diagram::GnuplotBlockProcessor do
125
- it "should generate PNG images when format is set to 'png'" do
126
- doc = <<-eos
127
- = Hello, Gnuplot!
128
- Doc Writer <doc@example.com>
129
-
130
- == First Section
12
+ include_examples "block", :gnuplot, GNUPLOT_CODE, [:png, :svg, :gif, :txt]
131
13
 
132
- [gnuplot, format="png"]
133
- ----
134
- #{code}
135
- ----
136
- eos
137
-
138
- d = load_asciidoc doc
139
- expect(d).to_not be_nil
140
-
141
- b = d.find { |bl| bl.context == :image }
142
- expect(b).to_not be_nil
143
-
144
- expect(b.content_model).to eq :empty
145
-
146
- target = b.attributes['target']
147
- expect(target).to_not be_nil
148
- expect(target).to match(/\.png$/)
149
- expect(File.exist?(target)).to be true
150
-
151
- expect(b.attributes['width']).to_not be_nil
152
- expect(b.attributes['height']).to_not be_nil
153
- end
154
-
155
- it "should generate SVG images when format is set to 'svg'" do
156
- doc = <<-eos
157
- = Hello, Gnuplot!
158
- Doc Writer <doc@example.com>
159
-
160
- == First Section
161
-
162
- [gnuplot, format="svg"]
163
- ----
164
- #{code}
165
- ----
166
- eos
167
-
168
- d = load_asciidoc doc
169
- expect(d).to_not be_nil
170
-
171
- b = d.find { |bl| bl.context == :image }
172
- expect(b).to_not be_nil
173
-
174
- expect(b.content_model).to eq :empty
175
-
176
- target = b.attributes['target']
177
- expect(target).to_not be_nil
178
- expect(target).to match(/\.svg/)
179
- expect(File.exist?(target)).to be true
180
-
181
- expect(b.attributes['width']).to_not be_nil
182
- expect(b.attributes['height']).to_not be_nil
183
- end
184
-
185
- it "should raise an error when when format is set to an invalid value" do
186
- doc = <<-eos
187
- = Hello, Gnuplot!
188
- Doc Writer <doc@example.com>
189
-
190
- == First Section
191
-
192
- [gnuplot, format="foobar"]
193
- ----
194
- ----
195
- eos
196
-
197
- expect { load_asciidoc doc }.to raise_error(/support.*format/i)
198
- end
199
-
200
- it "should not regenerate images when source has not changed" do
201
- File.write('gnuplot.txt', code)
202
-
203
- doc = <<-eos
204
- = Hello, Gnuplot!
205
- Doc Writer <doc@example.com>
206
-
207
- == First Section
208
-
209
- gnuplot::gnuplot.txt
210
-
211
- [gnuplot, format="png"]
212
- ----
213
- #{code}
214
- ----
215
- eos
216
-
217
- d = load_asciidoc doc
218
- b = d.find { |bl| bl.context == :image }
219
- expect(b).to_not be_nil
220
- target = b.attributes['target']
221
- mtime1 = File.mtime(target)
222
-
223
- sleep 1
224
-
225
- d = load_asciidoc doc
226
-
227
- mtime2 = File.mtime(target)
228
-
229
- expect(mtime2).to eq mtime1
230
- end
231
-
232
- it "should handle two block macros with the same source" do
233
- File.write('gnuplot.txt', code)
234
-
235
- doc = <<-eos
236
- = Hello, Gnuplot!
237
- Doc Writer <doc@example.com>
238
-
239
- == First Section
240
-
241
- gnuplot::gnuplot.txt[]
242
- gnuplot::gnuplot.txt[]
243
- eos
244
-
245
- load_asciidoc doc
246
- expect(File.exist?('gnuplot.png')).to be true
247
- end
248
-
249
- it "should respect target attribute in block macros" do
250
- File.write('gnuplot.txt', code)
251
-
252
- doc = <<-eos
253
- = Hello, Gnuplot!
254
- Doc Writer <doc@example.com>
255
-
256
- == First Section
257
-
258
- gnuplot::gnuplot.txt["foobar"]
259
- gnuplot::gnuplot.txt["foobaz"]
260
- eos
261
-
262
- load_asciidoc doc
263
- expect(File.exist?('foobar.png')).to be true
264
- expect(File.exist?('foobaz.png')).to be true
265
- expect(File.exist?('gnuplot.png')).to be false
266
- end
267
14
  it "should generate images with user defined size" do
268
15
  doc = <<-eos
269
16
  = Hello, Gnuplot!
@@ -273,7 +20,7 @@ Doc Writer <doc@example.com>
273
20
 
274
21
  [gnuplot, format="png",width="800", height="600"]
275
22
  ----
276
- #{code}
23
+ #{GNUPLOT_CODE}
277
24
  ----
278
25
  eos
279
26
 
@@ -303,7 +50,7 @@ Doc Writer <doc@example.com>
303
50
 
304
51
  [gnuplot, format="png", crop=false, transparent=false]
305
52
  ----
306
- #{code}
53
+ #{GNUPLOT_CODE}
307
54
  ----
308
55
  eos
309
56
 
@@ -333,7 +80,7 @@ Doc Writer <doc@example.com>
333
80
 
334
81
  [gnuplot, format="png", crop=true, transparent=true]
335
82
  ----
336
- #{code}
83
+ #{GNUPLOT_CODE}
337
84
  ----
338
85
  eos
339
86
 
@@ -363,7 +110,7 @@ Doc Writer <doc@example.com>
363
110
 
364
111
  [gnuplot, format="png", font="Arial"]
365
112
  ----
366
- #{code}
113
+ #{GNUPLOT_CODE}
367
114
  ----
368
115
  eos
369
116
 
@@ -393,7 +140,7 @@ Doc Writer <doc@example.com>
393
140
 
394
141
  [gnuplot, format="png", font="Arial,11"]
395
142
  ----
396
- #{code}
143
+ #{GNUPLOT_CODE}
397
144
  ----
398
145
  eos
399
146
 
@@ -423,7 +170,7 @@ Doc Writer <doc@example.com>
423
170
 
424
171
  [gnuplot, format="png", font="Arial", scale="0.5"]
425
172
  ----
426
- #{code}
173
+ #{GNUPLOT_CODE}
427
174
  ----
428
175
  eos
429
176
 
@@ -453,7 +200,7 @@ Doc Writer <doc@example.com>
453
200
 
454
201
  [gnuplot, format="png", background="red"]
455
202
  ----
456
- #{code}
203
+ #{GNUPLOT_CODE}
457
204
  ----
458
205
  eos
459
206