Class: Stepmod::Utils::Converters::P

Inherits:
ReverseAdoc::Converters::Base
  • Object
show all
Defined in:
lib/stepmod/utils/converters/p.rb

Instance Method Summary collapse

Instance Method Details

#convert(node, state = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/stepmod/utils/converters/p.rb', line 7

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