lib/metanorma/standoc/init.rb in metanorma-standoc-2.9.0 vs lib/metanorma/standoc/init.rb in metanorma-standoc-2.9.1

- old
+ new

@@ -47,10 +47,11 @@ @smartquotes = node.attr("smartquotes") != "false" @sourcecode_markup_start = node.attr("sourcecode-markup-start") || "{{{" @sourcecode_markup_end = node.attr("sourcecode-markup-end") || "}}}" @datauriimage = node.attr("data-uri-image") != "false" @datauriattachment = node.attr("data-uri-attachment") != "false" + @dataurimaxsize = node.attr("data-uri-maxsize")&.to_i || 13981013 @blockunnumbered = (node.attr("block-unnumbered") || "").split(",") .map(&:strip) end def init_reqt(node) @@ -100,14 +101,23 @@ end def init_biblio(node) @no_isobib_cache = node.attr("no-isobib-cache") @no_isobib = node.attr("no-isobib") + init_bib_log @bibdb = nil init_bib_caches(node) init_iev_caches(node) @local_bibdb = ::Metanorma::Standoc::LocalBiblio.new(node, @localdir, self) + end + + def init_bib_log + @relaton_log = StringIO.new + relaton_logger = Relaton::Logger::Log + .new(@relaton_log, levels: %i(info warn error fatal unknown), + formatter: Relaton::Logger::FormatterJSON) + Relaton.logger_pool[:my_logger] = relaton_logger end def init_math(node) @keepasciimath = node.attr("mn-keep-asciimath") && node.attr("mn-keep-asciimath") != "false"