Class: Markdown::LinkToAbsoluteRenderer

Inherits:
Redcarpet::Render::HTML
  • Object
show all
Defined in:
app/models/markdown.rb

Instance Method Summary collapse

Instance Method Details



3
4
5
6
7
# File 'app/models/markdown.rb', line 3

def link(link, title, content)
  link = "http://#{Setting[:domain]}#{link}" if link =~ /^\//
  title = %{ title="#{title}"} if title
  %{<a href="#{link}"#{title}>#{content}</a>}
end