Sha256: 5453474471dabacfa7e3b44d2852282caeb1486e8c4d8220421f63eb434d0b22

Contents?: true

Size: 556 Bytes

Versions: 14

Compression:

Stored size: 556 Bytes

Contents

module Asciidoctor
  module Csand
    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

14 entries across 14 versions & 1 rubygems

Version Path
metanorma-csand-1.3.9 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.3.8 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.3.7 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.3.6 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.3.5 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.3.4 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.3.3 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.3.2 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.3.1 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.3.0 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.2.3 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.2.2 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.2.1 lib/asciidoctor/csand/validate.rb
metanorma-csand-1.2.0 lib/asciidoctor/csand/validate.rb