class GistBlockMacro
Public Instance Methods
process(parent, target, attrs)
click to toggle source
# File lib/starter_web/_plugins/asciidoctor-extensions/gist-block.rb, line 35 def process parent, target, attrs title_html = (attrs.has_key? 'title') ? %(<div class="title">#{attrs['title']}</div>\n) : nil html = %(<div class="openblock gist mt-4 mb-5"> #{title_html} <div class="content"> <script src="https://gist.github.com/#{target}.js"></script> </div> </div>) create_pass_block parent, html, attrs, subs: nil end