asciidoctor-diagram 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +77 -1
  3. data/README.adoc +25 -483
  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 +303 -0
  10. data/docs/modules/ROOT/partials/create_diagram.adoc +131 -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 +38 -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 +4 -4
  19. data/lib/asciidoctor-diagram/bytefield.rb +7 -0
  20. data/lib/asciidoctor-diagram/bytefield/converter.rb +26 -0
  21. data/lib/asciidoctor-diagram/bytefield/extension.rb +14 -0
  22. data/lib/asciidoctor-diagram/diagram_converter.rb +5 -1
  23. data/lib/asciidoctor-diagram/diagram_processor.rb +106 -51
  24. data/lib/asciidoctor-diagram/diagram_source.rb +66 -19
  25. data/lib/asciidoctor-diagram/ditaa/converter.rb +20 -7
  26. data/lib/asciidoctor-diagram/ditaa/ditaa-1.3.17.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 +93 -0
  33. data/lib/asciidoctor-diagram/http/server.rb +10 -5
  34. data/lib/asciidoctor-diagram/lilypond/converter.rb +13 -3
  35. data/lib/asciidoctor-diagram/meme/converter.rb +24 -18
  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 +22 -14
  42. data/lib/asciidoctor-diagram/plantuml/plantuml-1.3.17.jar +0 -0
  43. data/lib/asciidoctor-diagram/smcat/converter.rb +3 -3
  44. data/lib/asciidoctor-diagram/svgbob/converter.rb +29 -1
  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 +29 -3
  52. data/lib/asciidoctor-diagram/util/cli_generator.rb +22 -2
  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 +9 -110
  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.14.jar → asciidoctor-diagram/util/server-1.3.17.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 +5 -143
  64. data/spec/blockdiag_spec.rb +5 -203
  65. data/spec/bpmn_spec.rb +52 -92
  66. data/spec/bytefield_spec.rb +92 -0
  67. data/spec/ditaa_spec.rb +37 -143
  68. data/spec/dpic_spec.rb +19 -0
  69. data/spec/erd_spec.rb +5 -202
  70. data/spec/gnuplot_spec.rb +2 -255
  71. data/spec/graphviz_spec.rb +6 -145
  72. data/spec/lilypond_spec.rb +5 -143
  73. data/spec/mermaid_spec.rb +68 -210
  74. data/spec/msc_spec.rb +2 -199
  75. data/spec/nomnoml_spec.rb +4 -142
  76. data/spec/pikchr_spec.rb +69 -0
  77. data/spec/plantuml_spec.rb +6 -578
  78. data/spec/shaape_spec.rb +12 -224
  79. data/spec/shared_examples.rb +603 -0
  80. data/spec/smcat_spec.rb +2 -140
  81. data/spec/svgbob_spec.rb +5 -143
  82. data/spec/symbolator_spec.rb +23 -0
  83. data/spec/syntrax_spec.rb +7 -217
  84. data/spec/test_helper.rb +4 -28
  85. data/spec/tikz_spec.rb +68 -18
  86. data/spec/umlet_spec.rb +2 -58
  87. data/spec/vega_spec.rb +4 -117
  88. data/spec/wavedrom_spec.rb +2 -199
  89. metadata +80 -15
  90. data/README_zh-CN.adoc +0 -336
  91. data/images/asciidoctor-diagram-process.png +0 -0
  92. data/lib/batik-all-1.10.jar +0 -0
  93. data/lib/ditaa-1.3.14.jar +0 -0
  94. data/lib/ditaamini-0.12.jar +0 -0
  95. data/lib/jlatexmath-minimal-1.0.5.jar +0 -0
  96. data/lib/plantuml-1.3.14.jar +0 -0
  97. data/lib/plantuml.jar +0 -0
  98. data/spec/bpmn-example.xml +0 -44
@@ -15,42 +15,50 @@ module Asciidoctor
15
15
  end
16
16
 
17
17
 
18
- def collect_options(source, name)
19
- bg_img = source.attr('background', nil, name)
18
+ def collect_options(source)
19
+ bg_img = source.attr('background')
20
20
  raise "background attribute is required" unless bg_img
21
21
 
22
- options = source.attr('options', '', name).split(',')
22
+ options = source.attr('options', '').split(',')
23
23
 
24
24
  {
25
25
  :bg_img => bg_img,
26
26
  :top_label => source.attr('top'),
27
27
  :bottom_label => source.attr('bottom'),
28
- :fill_color => source.attr('fillcolor', nil, name) || source.attr('fill-color', nil, name),
29
- :stroke_color => source.attr('strokecolor', nil, name) || source.attr('stroke-color', nil, name),
30
- :stroke_width => source.attr('strokewidth', nil, name) || source.attr('stroke-width', nil, name),
31
- :font => source.attr('font', 'Impact', name),
28
+ :fill_color => source.attr(['fillcolor', 'fill-color']),
29
+ :stroke_color => source.attr(['strokecolor', 'stroke-color']),
30
+ :stroke_width => source.attr(['strokewidth', 'stroke-width']),
31
+ :font => source.attr('font', 'Impact'),
32
32
  :noupcase => options.include?('noupcase'),
33
33
  }
34
34
  end
35
35
 
36
36
  def convert(source, format, options)
37
- convert = source.find_command('convert')
38
- identify = source.find_command('identify')
37
+ magick = source.find_command('magick', :raise_on_error => false)
38
+ if magick
39
+ convert = ->(*args) { Cli.run(magick, 'convert', *args) }
40
+ identify = ->(*args) { Cli.run(magick, 'identify', *args) }
41
+ else
42
+ convert_cmd = source.find_command('convert')
43
+ convert = ->(*args) { Cli.run(convert_cmd, *args) }
44
+ identify_cmd = source.find_command('identify')
45
+ identify = ->(*args) { Cli.run(identify_cmd, *args) }
46
+ end
39
47
 
40
48
  bg_img = options[:bg_img]
41
49
  raise "background attribute is required" unless bg_img
42
50
 
43
51
  bg_img = source.resolve_path(bg_img, source.attr('imagesdir'))
44
52
 
45
- top_label = options[:top]
46
- bottom_label = options[:bottom]
53
+ top_label = options[:top_label]
54
+ bottom_label = options[:bottom_label]
47
55
  fill_color = options[:fill_color] || 'white'
48
56
  stroke_color = options[:stroke_color] || 'black'
49
57
  stroke_width = options[:stroke_width] || '2'
50
58
  font = options[:font] || 'Impact'
51
59
  noupcase = options[:noupcase]
52
60
 
53
- dimensions = Cli.run(identify, '-format', '%w %h', bg_img)[:out].match(/(?<w>\d+) (?<h>\d+)/)
61
+ dimensions = identify.call('-format', '%w %h', bg_img)[:out].match(/(?<w>\d+) (?<h>\d+)/)
54
62
  bg_width = dimensions['w'].to_i
55
63
  bg_height = dimensions['h'].to_i
56
64
  label_width = bg_width
@@ -58,8 +66,7 @@ module Asciidoctor
58
66
 
59
67
  if top_label
60
68
  top_img = Tempfile.new(['meme', '.png'])
61
- Cli.run(
62
- convert,
69
+ convert.call(
63
70
  '-background', 'none',
64
71
  '-fill', fill_color,
65
72
  '-stroke', stroke_color,
@@ -76,8 +83,7 @@ module Asciidoctor
76
83
 
77
84
  if bottom_label
78
85
  bottom_img = Tempfile.new(['meme', '.png'])
79
- Cli.run(
80
- convert,
86
+ convert.call(
81
87
  '-background', 'none',
82
88
  '-fill', fill_color,
83
89
  '-stroke', stroke_color,
@@ -94,7 +100,7 @@ module Asciidoctor
94
100
 
95
101
  final_img = Tempfile.new(['meme', ".#{format.to_s}"])
96
102
 
97
- args = [convert, bg_img]
103
+ args = [bg_img]
98
104
  if top_img
99
105
  args << top_img.path << '-geometry' << '+0+0' << '-composite'
100
106
  end
@@ -105,7 +111,7 @@ module Asciidoctor
105
111
 
106
112
  args << final_img.path
107
113
 
108
- Cli.run(*args)
114
+ convert.call(*args)
109
115
 
110
116
  File.binread(final_img)
111
117
  end
@@ -15,18 +15,26 @@ module Asciidoctor
15
15
  [:png, :svg]
16
16
  end
17
17
 
18
- def collect_options(source, name)
18
+ def native_scaling?
19
+ true
20
+ end
21
+
22
+ def collect_options(source)
19
23
  options = {}
20
24
 
21
- options[:css] = source.attr('css', nil, name)
22
- options[:gantt_config] = source.attr('ganttconfig', nil, name) || source.attr('gantt-config', nil, name)
23
- options[:seq_config] = source.attr('sequenceconfig', nil, name) || source.attr('sequence-config', nil, name)
24
- options[:width] = source.attr('width', nil, name)
25
- options[:height] = source.attr('height', nil, name)
26
- options[:theme] = source.attr('theme', nil, name)
27
- options[:background] = source.attr('background', nil, name)
28
- options[:config] = source.attr('config', nil, name)
29
- options[:puppeteer_config] = source.attr('puppeteerconfig', nil, name) || source.attr('puppeteer-config', nil, name)
25
+ options[:css] = source.attr('css')
26
+ options[:gantt_config] = source.attr(['ganttconfig', 'gantt-config'])
27
+ options[:seq_config] = source.attr(['sequenceconfig', 'sequence-config'])
28
+ options[:width] = source.attr('width')
29
+ options[:height] = source.attr('height')
30
+ options[:scale] = source.attr('scale')
31
+ if options[:scale]
32
+ raise "Mermaid only supports integer scale factors: #{options[:scale]}" unless options[:scale] =~ /^[0-9]+$/
33
+ end
34
+ options[:theme] = source.attr('theme')
35
+ options[:background] = source.attr('background')
36
+ options[:config] = source.attr('config')
37
+ options[:puppeteer_config] = source.attr(['puppeteerconfig', 'puppeteer-config'])
30
38
 
31
39
  options
32
40
  end
@@ -56,9 +64,17 @@ module Asciidoctor
56
64
 
57
65
  opts[:width] = options[:width]
58
66
 
59
- mmdc = source.find_command('mmdc', :raise_on_error => false)
67
+ mmdc = nil
68
+ mmdc_exception = nil
69
+ begin
70
+ mmdc = source.find_command('mmdc')
71
+ rescue => e
72
+ mmdc_exception = e
73
+ end
74
+
60
75
  if mmdc
61
76
  opts[:height] = options[:height]
77
+ opts[:scale] = options[:scale]
62
78
  opts[:theme] = options[:theme]
63
79
  opts[:background] = options[:background]
64
80
  config = options[:config]
@@ -67,8 +83,16 @@ module Asciidoctor
67
83
  end
68
84
  run_mmdc(mmdc, source, format, opts)
69
85
  else
70
- mermaid = source.find_command('mermaid')
71
- run_mermaid(mermaid, source, format, opts)
86
+ begin
87
+ mermaid = source.find_command('mermaid')
88
+ run_mermaid(mermaid, source, format, opts)
89
+ rescue
90
+ if mmdc_exception
91
+ raise mmdc_exception
92
+ else
93
+ raise
94
+ end
95
+ end
72
96
  end
73
97
  end
74
98
 
@@ -93,6 +117,10 @@ module Asciidoctor
93
117
  args << '--height' << options[:height]
94
118
  end
95
119
 
120
+ if options[:scale]
121
+ args << '--scale' << options[:scale]
122
+ end
123
+
96
124
  if options[:background]
97
125
  bg = options[:background]
98
126
  bg = "##{bg}" unless bg[0] == '#'
@@ -134,7 +162,10 @@ module Asciidoctor
134
162
  args << '--puppeteerConfigFile' << Platform.native_path(options[:puppeteer])
135
163
  end
136
164
 
137
- args
165
+ {
166
+ :args => args,
167
+ :env => {'NODE_OPTIONS' => '--unhandled-rejections=strict'}
168
+ }
138
169
  end
139
170
  end
140
171
 
@@ -14,8 +14,8 @@ module Asciidoctor
14
14
  [:png, :svg]
15
15
  end
16
16
 
17
- def collect_options(source, name)
18
- {:font => source.attr('font', nil, name)}
17
+ def collect_options(source)
18
+ {:font => source.attr('font')}
19
19
  end
20
20
 
21
21
  def convert(source, format, options)
@@ -0,0 +1,7 @@
1
+ require 'asciidoctor/extensions'
2
+ require_relative 'pikchr/extension'
3
+
4
+ Asciidoctor::Extensions.register do
5
+ block Asciidoctor::Diagram::PikchrBlockProcessor, :pikchr
6
+ block_macro Asciidoctor::Diagram::PikchrBlockMacroProcessor, :pikchr
7
+ end
@@ -0,0 +1,33 @@
1
+ require_relative '../diagram_converter'
2
+ require_relative '../util/cli_generator'
3
+ require_relative '../util/platform'
4
+
5
+ module Asciidoctor
6
+ module Diagram
7
+ # @private
8
+ class PikchrConverter
9
+ include DiagramConverter
10
+ include CliGenerator
11
+
12
+
13
+ def supported_formats
14
+ [:svg]
15
+ end
16
+
17
+ def convert(source, format, options)
18
+ pikchr_path = source.find_command('pikchr')
19
+
20
+ output = generate_file_stdout(pikchr_path, format.to_s, source.to_s) do |tool_path, input_path|
21
+ [tool_path, "--svg-only", input_path]
22
+ end
23
+
24
+ if output.start_with? '<svg'
25
+ output
26
+ else
27
+ error = output.gsub(/<\/?[a-z]+>\n?/i, '')
28
+ raise error
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,14 @@
1
+ require_relative 'converter'
2
+ require_relative '../diagram_processor'
3
+
4
+ module Asciidoctor
5
+ module Diagram
6
+ class PikchrBlockProcessor < DiagramBlockProcessor
7
+ use_converter PikchrConverter
8
+ end
9
+
10
+ class PikchrBlockMacroProcessor < DiagramBlockMacroProcessor
11
+ use_converter PikchrConverter
12
+ end
13
+ end
14
+ end
@@ -7,23 +7,29 @@ module Asciidoctor
7
7
  class PlantUmlConverter
8
8
  include DiagramConverter
9
9
 
10
- JARS = [
11
- 'plantuml-1.3.14.jar',
12
- 'plantuml.jar',
13
- 'jlatexmath-minimal-1.0.5.jar',
14
- 'batik-all-1.10.jar'
15
- ].map do |jar|
16
- File.expand_path File.join('../..', jar), File.dirname(__FILE__)
17
- end
18
- Java.classpath.concat JARS
10
+ CLASSPATH_ENV = 'DIAGRAM_PLANTUML_CLASSPATH'
11
+ LIB_DIR = File.expand_path('../..', File.dirname(__FILE__))
12
+ PLANTUML_JARS = if ENV.has_key?(CLASSPATH_ENV)
13
+ ENV[CLASSPATH_ENV].split(File::PATH_SEPARATOR)
14
+ else
15
+ begin
16
+ require 'asciidoctor-diagram/plantuml/classpath'
17
+ ::Asciidoctor::Diagram::PlantUmlClasspath::JAR_FILES
18
+ rescue LoadError
19
+ raise "Could not load PlantUML. Eiter require 'asciidoctor-diagram-plantuml' or specify the location of the PlantUML JAR(s) using the 'DIAGRAM_PLANTUML_CLASSPATH' environment variable."
20
+ end
21
+ end
22
+
23
+ Java.classpath.concat Dir[File.join(File.dirname(__FILE__), '*.jar')].freeze
24
+ Java.classpath.concat PLANTUML_JARS
19
25
 
20
26
  def supported_formats
21
- [:png, :svg, :txt]
27
+ [:png, :svg, :txt, :atxt, :utxt]
22
28
  end
23
29
 
24
- def collect_options(source, name)
30
+ def collect_options(source)
25
31
  {
26
- :config => source.attr('plantumlconfig', nil, true) || source.attr('config', nil, name)
32
+ :config => source.attr('plantumlconfig', nil, true) || source.attr('config')
27
33
  }
28
34
  end
29
35
 
@@ -37,8 +43,10 @@ module Asciidoctor
37
43
  mime_type = 'image/png'
38
44
  when :svg
39
45
  mime_type = 'image/svg+xml'
40
- when :txt
46
+ when :txt, :utxt
41
47
  mime_type = 'text/plain;charset=utf-8'
48
+ when :atxt
49
+ mime_type = 'text/plain'
42
50
  else
43
51
  raise "Unsupported format: #{format}"
44
52
  end
@@ -76,7 +84,7 @@ module Asciidoctor
76
84
  code = "@start#{tag}\n#{code}\n@end#{tag}" unless code.index("@start") && code.index("@end")
77
85
 
78
86
  code.gsub!(/(?<=<img:)[^>]+(?=>)/) do |match|
79
- resolve_path(match, source, source.attr('imagesdir'))
87
+ resolve_path(match, source, source.attr('imagesdir', nil, false))
80
88
  end
81
89
 
82
90
  code.gsub!(/(?:(?<=!include\s)|(?<=!includesub\s))\s*[^<][^!\n\r]+/) do |match|
@@ -14,10 +14,10 @@ module Asciidoctor
14
14
  [:svg]
15
15
  end
16
16
 
17
- def collect_options(source, name)
17
+ def collect_options(source)
18
18
  {
19
- :direction => source.attr('direction', nil, name),
20
- :engine => source.attr('engine', nil, name)
19
+ :direction => source.attr('direction'),
20
+ :engine => source.attr('engine')
21
21
  }
22
22
  end
23
23
 
@@ -14,10 +14,38 @@ module Asciidoctor
14
14
  [:svg]
15
15
  end
16
16
 
17
+ def native_scaling?
18
+ true
19
+ end
20
+
21
+ OPTIONS = {
22
+ :font_family => lambda { |o, v| o << '--font-family' << v if v },
23
+ :font_size => lambda { |o, v| o << '--font-size' << v if v },
24
+ :stroke_width => lambda { |o, v| o << '--stroke-width' << v if v },
25
+ :scale => lambda { |o, v| o << '--scale' << v if v }
26
+ }
27
+
28
+ def collect_options(source)
29
+ options = {}
30
+
31
+ OPTIONS.keys.each do |option|
32
+ attr_name = option.to_s.tr('_', '-')
33
+ options[option] = source.attr(attr_name) || source.attr(attr_name, nil, 'svgbob-option')
34
+ end
35
+
36
+ options
37
+ end
38
+
17
39
 
18
40
  def convert(source, format, options)
41
+
42
+ flags = []
43
+ options.each do |option, value|
44
+ OPTIONS[option].call(flags, value)
45
+ end
46
+
19
47
  generate_stdin(source.find_command('svgbob'), format.to_s, source.to_s) do |tool_path, output_path|
20
- [tool_path, '-o', Platform.native_path(output_path)]
48
+ ([tool_path, '-o', Platform.native_path(output_path)] + flags)
21
49
  end
22
50
  end
23
51
  end
@@ -0,0 +1,7 @@
1
+ require 'asciidoctor/extensions'
2
+ require_relative 'symbolator/extension'
3
+
4
+ Asciidoctor::Extensions.register do
5
+ block Asciidoctor::Diagram::SymbolatorBlockProcessor, :symbolator
6
+ block_macro Asciidoctor::Diagram::SymbolatorBlockMacroProcessor, :symbolator
7
+ end
@@ -0,0 +1,23 @@
1
+ require_relative '../diagram_converter'
2
+ require_relative '../util/cli_generator'
3
+ require_relative '../util/platform'
4
+
5
+ module Asciidoctor
6
+ module Diagram
7
+ # @private
8
+ class SymbolatorConverter
9
+ include DiagramConverter
10
+ include CliGenerator
11
+
12
+ def supported_formats
13
+ [:png, :pdf, :svg]
14
+ end
15
+
16
+ def convert(source, format, options)
17
+ generate_stdin(source.find_command('symbolator'), format.to_s, source.to_s) do |tool_path, output_path|
18
+ [tool_path, "-i-", "-o#{Platform.native_path(output_path)}", "-f#{format.to_s}"]
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,14 @@
1
+ require_relative '../diagram_processor'
2
+ require_relative 'converter'
3
+
4
+ module Asciidoctor
5
+ module Diagram
6
+ class SymbolatorBlockProcessor < DiagramBlockProcessor
7
+ use_converter SymbolatorConverter
8
+ end
9
+
10
+ class SymbolatorBlockMacroProcessor < DiagramBlockMacroProcessor
11
+ use_converter SymbolatorConverter
12
+ end
13
+ end
14
+ end
@@ -14,16 +14,15 @@ module Asciidoctor
14
14
  [:png, :svg]
15
15
  end
16
16
 
17
- def collect_options(source, name)
17
+ def collect_options(source)
18
18
  {
19
- :heading => source.attr('heading', nil, name),
20
- :scale => source.attr('scale', nil, name),
21
- :transparent => source.attr('transparent', nil, name),
22
- :style => source.attr('style', nil, name)
19
+ :heading => source.attr('heading'),
20
+ :scale => source.attr('scale'),
21
+ :transparent => source.attr('transparent'),
22
+ :style => source.attr('style')
23
23
  }
24
24
  end
25
25
 
26
-
27
26
  def convert(source, format, options)
28
27
  generate_file(source.find_command('syntrax'), 'spec', format.to_s, source.to_s) do |tool_path, input_path, output_path|
29
28
  args = [tool_path, '-i', Platform.native_path(input_path), '-o', Platform.native_path(output_path)]
@@ -50,6 +49,10 @@ module Asciidoctor
50
49
  args
51
50
  end
52
51
  end
52
+
53
+ def native_scaling?
54
+ true
55
+ end
53
56
  end
54
57
  end
55
58
  end