lib/maruku/input/parse_block.rb
def pick_apart_non_inline_html(children)
    output = []
    para_children = []

    children.each do |child|
      if element_is_non_inline_html?(child)
        unless para_children.empty?
          # Fix up paragraphs before non-inline elements having an extra space
          last_child = para_children.last
          if last_child.is_a?(String) && !last_child.empty?
            last_child.replace last_child[0..-2]
          end

          output << md_par(para_children)
          para_children = []
        end
        output << child
      else
        para_children << child
      end
    end

    unless para_children.empty?
      output << md_par(para_children)
    end

    output
  end
# If there are non-inline HTML tags in the paragraph, break them out into
# their own elements and make paragraphs out of everything else.
If there are non-inline HTML tags in the paragraph, break them out into
their own elements and make paragraphs out of everything else.
If there are non - inline HTML tags in the paragraph break them out into their own elements and make paragraphs out of everything else .
def pick_apart_non_inline_html(children)
    output = []
    para_children = []
    children.each do |child|
      if element_is_non_inline_html?(child)
        unless para_children.empty?
          last_child = para_children.last
          if last_child.is_a?(String) && !last_child.empty?
            last_child.replace last_child[0..-2]
          end
          output << md_par(para_children)
          para_children = []
        end
        output << child
      else
        para_children << child
      end
    end
    unless para_children.empty?
      output << md_par(para_children)
    end
    output
  end
def pick_apart_non_inline_html ( children ) output = [ ] para_children = [ ] children . each do | child | if element_is_non_inline_html? ( child ) unless para_children . empty? last_child = para_children . last if last_child . is_a? ( String ) && ! last_child . empty? last_child . replace last_child [ 0 .. - 2 ] end output << md_par ( para_children ) para_children = [ ] end output << child else para_children << child end end unless para_children . empty? output << md_par ( para_children ) end output end
If there are non-inline HTML tags in the paragraph, break them out into
their own elements and make paragraphs out of everything else.
If there are non - inline HTML tags in the paragraph break them out into their own elements and make paragraphs out of everything else .
# Fix up paragraphs before non-inline elements having an extra space
children