Sha256: 0ee734614b9cdf9f355710fc6f82471b56984d4ab7575b9142a8d2c2376bdced

Contents?: true

Size: 520 Bytes

Versions: 14

Compression:

Stored size: 520 Bytes

Contents

# frozen_string_literal: true

module Stepmod
  module Utils
    module Converters
      class P < Stepmod::Utils::Converters::Base
        def convert(node, state = {})
          id = node["id"]
          anchor = id ? "[[#{id}]]\n" : ""
          if state[:tdsinglepara]
            "#{anchor}#{treat_children(node, state).strip}"
          else
            "\n\n#{anchor}#{treat_children(node, state).strip}\n\n"
          end
        end
      end

      ReverseAdoc::Converters.register :p, P.new
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
stepmod-utils-0.6.7 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.6.6 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.6.5 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.6.3 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.6.2 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.6.1 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.6.0 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.5.0 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.4.14 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.4.13 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.4.12 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.4.11 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.4.10 lib/stepmod/utils/converters/p.rb
stepmod-utils-0.4.9 lib/stepmod/utils/converters/p.rb