Sha256: fb308366535b8f76bd3456d8690f403a73a9e8acb3f1e26aaca561a5596da5b2

Contents?: true

Size: 645 Bytes

Versions: 42

Compression:

Stored size: 645 Bytes

Contents

require_relative "init"
require "isodoc"

module IsoDoc
  module MPFA
    class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
      def annex1(f)
        lbl = @xrefs.anchor(f['id'], :label)
        if t = f.at(ns("./title"))
          t.children = "<strong>#{t.children.to_xml}</strong>"
        end
        prefix_name(f, " ", lbl, "title")
      end

      def clause1(f)
        lbl = @xrefs.anchor(f['id'], :label, f.parent.name != "sections")
        if lbl == "1" and !f.at(ns("./title"))
          prefix_name(f, "<tab/>", " ", "title")
        else
          super
        end
      end

      include Init
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
metanorma-mpfa-0.5.8 lib/isodoc/mpfa/presentation_xml_convert.rb
metanorma-mpfa-0.5.7 lib/isodoc/mpfa/presentation_xml_convert.rb