lib/asciidoctor/nist/converter.rb in metanorma-nist-1.0.2 vs lib/asciidoctor/nist/converter.rb in metanorma-nist-1.0.3
- old
+ new
@@ -107,10 +107,11 @@
File.open(filename, "w:UTF-8") { |f| f.write(ret) }
html_converter(node).convert filename unless node.attr("nodoc")
word_converter(node).convert filename unless node.attr("nodoc")
pdf_converter(node).convert filename unless node.attr("nodoc")
end
+ @log.write(@filename + ".err") unless @novalid
@files_to_delete.each { |f| FileUtils.rm f }
ret
end
def clause_parse(attrs, xml, node)
@@ -152,20 +153,20 @@
def section(node)
a = section_attributes(node)
noko do |xml|
case sectiontype(node)
- #when "normative references" then norm_ref_parse(a, xml, node)
+ #when "normative references" then norm_ref_parse(a, xml, node)
when "terms and definitions"
if node.attr("style") == "appendix" && node.level == 1
@term_def = true
terms_annex_parse(a, xml, node)
@term_def = false
else
clause_parse(a, xml, node)
end
- when "acknowledgements"
+ when "acknowledgements"
acknowledgements_parse(a, xml, node)
else
if @term_def
term_def_subclause_parse(a, xml, node)
elsif @biblio then bibliography_parse(a, xml, node)
@@ -218,10 +219,10 @@
def refitem(xml, item, node)
item.sub!(Regexp.new("^(<ref[^>]+>)\\[(#{NIST_PREFIX_REFS}) "),
"\\1[NIST \\2 ")
super
end
-
+
def fetch_ref(xml, code, year, **opts)
code.sub!(Regexp.new("^(#{NIST_PREFIX_REFS}) "), "NIST \\1 ")
super
end