lib/asciidoctor/csd/validate.rb in metanorma-csd-1.3.15 vs lib/asciidoctor/csd/validate.rb in metanorma-csd-1.3.16

- old
+ new

@@ -12,18 +12,18 @@ end def doctype_validate(xmldoc) doctype = xmldoc&.at("//bibdata/ext/doctype")&.text %w(directive guide specification standard report administrative amendment - technical-corrigendum advisory).include? doctype or - warn "Document Attributes: #{doctype} is not a recognised document type" + technical-corrigendum advisory).include?(doctype) or + @log.add("Document Attributes", nil, "#{doctype} is not a recognised document type") 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" + published withdrawn).include?(stage) or + @log.add("Document Attributes", nil, "#{stage} is not a recognised status") end end end end