lib/markdown_converter.rb
# Filters the source for bullet list items.
#
# Each item is wrapped in HTML to identify, style, and layer
# useful behavior on top of.
#
# Modifications apply to the parsed document directly.
#
# Returns nothing.
Filters the source for bullet list items.
Each item is wrapped in HTML to identify, style, and layer
useful behavior on top of.

Modifications apply to the parsed document directly.

Returns nothing.
Filters the source for bullet list items . Each item is wrapped in HTML to identify style and layer useful behavior on top of . Modifications apply to the parsed document directly . Returns nothing .
def filter!
      list_items.reverse.each do |li|
        outer, inner =
          if p = li.xpath(ItemParaSelector)[0]
            [p, p.inner_html]
          else
            [li, li.inner_html]
          end
        if match = (inner.chomp =~ ItemPattern && $1)
          add_css_class(li, 'bullet-list-item')
          outer.inner_html = render_bullet_list_item(inner)
        end
      end
    end
def filter! list_items . reverse . each do | li | outer , inner = if p = li . xpath ( ItemParaSelector ) [ 0 ] [ p , p . inner_html ] else [ li , li . inner_html ] end if match = ( inner . chomp =~ ItemPattern && $1 ) add_css_class ( li , 'bullet-list-item' ) outer . inner_html = render_bullet_list_item ( inner ) end end end
Filters the source for bullet list items.
Filters the source for bullet list items .
# add_css_class(li.parent, 'bullet-list') # item = Bullet::Item.new(match, inner) # prepend because we're iterating in reverse # bullet_list_items.unshift item