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.6.9 lib/metanorma/un/input.rb
metanorma-un-0.6.8 lib/metanorma/un/input.rb
metanorma-un-0.6.7 lib/metanorma/un/input.rb
metanorma-un-0.6.6 lib/metanorma/un/input.rb
metanorma-un-0.6.5 lib/metanorma/un/input.rb
metanorma-un-0.6.4 lib/metanorma/un/input.rb
metanorma-un-0.6.3 lib/metanorma/un/input.rb
metanorma-un-0.6.2 lib/metanorma/un/input.rb
metanorma-un-0.6.1 lib/metanorma/un/input.rb
metanorma-un-0.6.0 lib/metanorma/un/input.rb
metanorma-un-0.5.16 lib/metanorma/un/input.rb
metanorma-un-0.5.15 lib/metanorma/un/input.rb
metanorma-un-0.5.14 lib/metanorma/un/input.rb
metanorma-un-0.5.13 lib/metanorma/un/input.rb
metanorma-un-0.5.12 lib/metanorma/un/input.rb
metanorma-un-0.5.11 lib/metanorma/un/input.rb
metanorma-un-0.5.10 lib/metanorma/un/input.rb
metanorma-un-0.5.9 lib/metanorma/un/input.rb
metanorma-un-0.5.8 lib/metanorma/un/input.rb
metanorma-un-0.5.7 lib/metanorma/un/input.rb