Sha256: f389242da4b100f181e230843453ad03022833d34c5666bf5fa06d869ec5dc89
Contents?: true
Size: 625 Bytes
Versions: 7
Compression:
Stored size: 625 Bytes
Contents
require 'middleman-core/renderers/redcarpet' module GovukTechDocs class TechDocsHTMLRenderer < Middleman::Renderers::MiddlemanRedcarpetHTML include Redcarpet::Render::SmartyPants def header(text, level) anchor = UniqueIdentifierGenerator.instance.create(text, level) %(<h#{level} id="#{anchor}">#{text}</h#{level}>) end def image(link, *args) %(<a href="#{link}" target="_blank" rel="noopener noreferrer">#{super}</a>) end def table(header, body) %(<div class="table-container"> <table> #{header}#{body} </table> </div>) end end end
Version data entries
7 entries across 7 versions & 1 rubygems