Sha256: 5a559519584737a9748978eda269f7ad3719bf88f9982c1754a8151b77a9da94
Contents?: true
Size: 1.04 KB
Versions: 16
Compression:
Stored size: 1.04 KB
Contents
require "metanorma/processor" module Metanorma module Iso class Processor < Metanorma::Processor def initialize @short = :iso @input_format = :asciidoc @asciidoctor_backend = :iso end def output_formats super.merge( html: "html", html_alt: "alt.html", doc: "doc" ) end def version "Asciidoctor::ISO #{Asciidoctor::ISO::VERSION}/IsoDoc #{IsoDoc::VERSION}" end def input_to_isodoc(file) Metanorma::Input::Asciidoc.new.process(file, @asciidoctor_backend) end def output(isodoc_node, outname, format, options={}) case format when :html IsoDoc::Iso::HtmlConvert.new(options).convert(outname, isodoc_node) when :html_alt IsoDoc::Iso::HtmlConvert.new(options.merge(alt: true)).convert(outname, isodoc_node) when :doc IsoDoc::Iso::WordConvert.new(options).convert(outname, isodoc_node) else super end end end end end
Version data entries
16 entries across 16 versions & 2 rubygems