Class: Kramdown::Converter::Html

Inherits:
Object
  • Object
show all
Defined in:
lib/kramdown-pages/converter.rb

Instance Method Summary collapse

Instance Method Details

#convert_page(el, indent) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/kramdown-pages/converter.rb', line 5

def convert_page(el, indent)
  if page = Page.find_by_path(el.value)
    %{<a href="#{page.path}">#{page.title}</a>}
  else
    %{<a>#{el.value}</a>}
  end
end