Sha256: d2643e1ae57352385b9b399cabd3f634a3ee26c63952b4197fb00ffafa06ed66
Contents?: true
Size: 521 Bytes
Versions: 29
Compression:
Stored size: 521 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}#{notice}</div>" end end end end
Version data entries
29 entries across 29 versions & 1 rubygems