Class: Plezi::Base::RenderMarkDown::NewPageLinksMDRenderer

Inherits:
Redcarpet::Render::HTML
  • Object
show all
Defined in:
lib/plezi/render/markdown.rb

Overview

A custom render engine that makes sure links to foriegn sites open in a new window/tab.

Instance Method Summary collapse

Instance Method Details

review's the link and renders the Html


18
19
20
# File 'lib/plezi/render/markdown.rb', line 18

def link(link, title, content)
  "<a href=\"#{link}\"#{" target='_blank'" if link =~ /^http[s]?\:\/\//}#{" title=\"#{title}\"" if title}>#{content}</a>"
end