Class: Garage::Docs::Renderer
- Inherits:
-
Redcarpet::Render::HTML
- Object
- Redcarpet::Render::HTML
- Garage::Docs::Renderer
- Includes:
- AnchorBuilding, ConsoleLinkBuilding
- Defined in:
- lib/garage/docs/renderer.rb
Instance Method Summary collapse
Methods included from AnchorBuilding
Methods included from ConsoleLinkBuilding
Instance Method Details
#header(text, header_level) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/garage/docs/renderer.rb', line 7 def header(text, header_level) if header_level == 2 id = to_anchor(text) %!<a href="##{id}"><h#{header_level} id="#{id}">#{text} #{build_console_link(text)}</h#{header_level}></a>! else %!<h#{header_level}>#{text}</h#{header_level}>! end end |