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