Class: Markdown::LinkToAbsoluteRenderer
- Inherits:
-
Redcarpet::Render::HTML
- Object
- Redcarpet::Render::HTML
- Markdown::LinkToAbsoluteRenderer
- Defined in:
- app/models/markdown.rb
Instance Method Summary collapse
Instance Method Details
#link(link, title, content) ⇒ Object
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 |