Sha256: 29c778f541fa58a159ba073cabd8ae51afa6693e43a1e419a2c003149bffc83b

Contents?: true

Size: 412 Bytes

Versions: 45

Compression:

Stored size: 412 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)
          }.reject { |_, val| val.nil? }
          super.merge(new_options)
        end
      end
    end
  end
end

Version data entries

45 entries across 44 versions & 2 rubygems

Version Path
metanorma-un-0.5.6 lib/metanorma/un/input.rb
metanorma-un-0.5.5 lib/metanorma/un/input.rb
metanorma-un-0.5.4 lib/metanorma/un/input.rb
metanorma-un-0.5.3 lib/metanorma/un/input.rb
metanorma-un-0.5.2 lib/metanorma/un/input.rb
metanorma-un-0.5.1 lib/metanorma/un/input.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-un-0.4.2/lib/metanorma/un/input.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-un-0.5.0/lib/metanorma/un/input.rb
metanorma-un-0.5.0 lib/metanorma/un/input.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-un-0.4.2/lib/metanorma/un/input.rb
metanorma-un-0.4.3 lib/metanorma/un/input.rb
metanorma-un-0.4.2 lib/metanorma/un/input.rb
metanorma-un-0.4.1 lib/metanorma/un/input.rb
metanorma-un-0.4.0 lib/metanorma/un/input.rb
metanorma-un-0.3.11 lib/metanorma/un/input.rb
metanorma-un-0.3.10 lib/metanorma/un/input.rb
metanorma-un-0.3.9 lib/metanorma/un/input.rb
metanorma-un-0.3.8 lib/metanorma/un/input.rb
metanorma-un-0.3.7 lib/metanorma/un/input.rb
metanorma-un-0.3.6 lib/metanorma/un/input.rb