Sha256: 92e875ec19ba93620440b7e5e01faa2e111127e0dd9a6d8b9a3c31b762e16c36

Contents?: true

Size: 564 Bytes

Versions: 14

Compression:

Stored size: 564 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
        @log.add("Document Attributes", nil, "#{stage} is not a recognised status")
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-un-0.4.2/lib/asciidoctor/un/validate.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-un-0.4.2/lib/asciidoctor/un/validate.rb
metanorma-un-0.4.3 lib/asciidoctor/un/validate.rb
metanorma-un-0.4.2 lib/asciidoctor/un/validate.rb
metanorma-un-0.4.1 lib/asciidoctor/un/validate.rb
metanorma-un-0.4.0 lib/asciidoctor/un/validate.rb
metanorma-un-0.3.11 lib/asciidoctor/un/validate.rb
metanorma-un-0.3.10 lib/asciidoctor/un/validate.rb
metanorma-un-0.3.9 lib/asciidoctor/un/validate.rb
metanorma-un-0.3.8 lib/asciidoctor/un/validate.rb
metanorma-un-0.3.7 lib/asciidoctor/un/validate.rb
metanorma-un-0.3.6 lib/asciidoctor/un/validate.rb
metanorma-un-0.3.5 lib/asciidoctor/un/validate.rb
metanorma-un-0.3.4 lib/asciidoctor/un/validate.rb