Sha256: 596cab051d4547c35ec265808866cf737fe35437e963b774b29a31f1ff472d9c

Contents?: true

Size: 554 Bytes

Versions: 3

Compression:

Stored size: 554 Bytes

Contents

module Asciidoctor
  module UN
    class Converter < Standoc::Converter
      def content_validate(doc)
        super
        bibdata_validate(doc.root)
      end

      def bibdata_validate(doc)
        stage_validate(doc)
      end

      def stage_validate(xmldoc)
        stage = xmldoc&.at("//bibdata/status/stage")&.text
        %w(proposal working-draft committee-draft draft-standard final-draft
        published withdrawn).include? stage or
          warn "Document Attributes: #{stage} is not a recognised status"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
metanorma-un-0.3.3 lib/asciidoctor/un/validate.rb
metanorma-un-0.3.2 lib/asciidoctor/un/validate.rb
metanorma-un-0.3.1 lib/asciidoctor/un/validate.rb