Sha256: 55b136b1e65868cbbf45a7defa49406df59919fbfdfbb3cae3149d986ef7fc88

Contents?: true

Size: 369 Bytes

Versions: 74

Compression:

Stored size: 369 Bytes

Contents

require "metanorma/input"

module Metanorma
  module UN
    module Input
      class Asciidoc < ::Metanorma::Input::Asciidoc
        def extract_options(file)
          head = file.sub(/\n\n.*$/m, "\n")
          /\n(?<toc>:toc:)/ =~ head
          new_options = { toc: defined?(toc) }.compact
          super.merge(new_options)
        end
      end
    end
  end
end

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
metanorma-un-0.12.19 lib/metanorma/un/input.rb
metanorma-un-0.12.18 lib/metanorma/un/input.rb
metanorma-un-0.12.17 lib/metanorma/un/input.rb
metanorma-un-0.12.16 lib/metanorma/un/input.rb
metanorma-un-0.12.15 lib/metanorma/un/input.rb
metanorma-un-0.12.14 lib/metanorma/un/input.rb
metanorma-un-0.12.13 lib/metanorma/un/input.rb
metanorma-un-0.12.11 lib/metanorma/un/input.rb
metanorma-un-0.12.10 lib/metanorma/un/input.rb
metanorma-un-0.12.9 lib/metanorma/un/input.rb
metanorma-un-0.12.8 lib/metanorma/un/input.rb
metanorma-un-0.12.7 lib/metanorma/un/input.rb
metanorma-un-0.12.6 lib/metanorma/un/input.rb
metanorma-un-0.12.5 lib/metanorma/un/input.rb
metanorma-un-0.12.4 lib/metanorma/un/input.rb
metanorma-un-0.12.3 lib/metanorma/un/input.rb
metanorma-un-0.12.1 lib/metanorma/un/input.rb
metanorma-un-0.12.0 lib/metanorma/un/input.rb
metanorma-un-0.11.8 lib/metanorma/un/input.rb
metanorma-un-0.11.6 lib/metanorma/un/input.rb