Class: Marko::Renderers::Title
- Defined in:
- lib/marko/renderers/title.rb
Overview
Title renderer
Constant Summary
Constants inherited from Renderer
Instance Method Summary collapse
Instance Method Details
#render(topic) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/marko/renderers/title.rb', line 8 def render(topic) head = ?# * topic.nesting_level title = topic.title.empty? ? topic.id.split(/\./).last : topic.title url = Url.new.render(topic.id) "#{head} #{title} {#{url}}" end |