14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/metanorma/plugin/plantuml/block_processor.rb', line 14
def process(parent, reader, attrs)
source = reader.source
if parent.document.attr("plantuml-disabled")
return abort(parent, source, attrs,
"PlantUML processing disabled")
end
unless Backend.plantuml_available?
return abort(parent, source, attrs, "PlantUML not installed")
end
formats = parse_formats(attrs, parent.document)
options = parse_options(parent, reader, attrs)
process_image_block(parent, source, attrs, formats, options)
rescue StandardError => e
abort(parent, source, attrs, e.message)
end
|