Sha256: e743c1aea42d12e3d92eaa3ca21ad77ceeb4164cee25222aed55fc58f188121f
Contents?: true
Size: 538 Bytes
Versions: 2
Compression:
Stored size: 538 Bytes
Contents
module Gollum class Macro class Note < Gollum::Macro def render(notice, octicon = 'info') icon = "" unless octicon.empty? begin icon = Octicons::Octicon.new(octicon, {width: 24, height: 24}) rescue RuntimeError icon = Octicons::Octicon.new('info', {width: 24, height: 24}) end icon.options[:class] << ' mr-2' icon = icon.to_svg end "<div class='flash'>#{icon}#{CGI::escapeHTML(notice)}</div>" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gollum-lib-5.1.2-java | lib/gollum-lib/macro/note.rb |
gollum-lib-5.1.2 | lib/gollum-lib/macro/note.rb |