Sha256: 0bfd0cc848afad4fbbf07b5f25ec45c2bc2b752f012f74d88642e220b2f19b9d
Contents?: true
Size: 344 Bytes
Versions: 1
Compression:
Stored size: 344 Bytes
Contents
require 'html/pipeline' class HelpMarkdownFilter < HTML::Pipeline::MarkdownFilter def call html = super format_callout!(html) end def format_callout!(html) html.gsub!(/(?:<p>)?{{#(tip|warning|error)}}(?:<\/p>)?/, '<div class="alert \1">') html.gsub!(/(?:<p>)?{{\/(tip|warning|error)}}(?:<\/p>)?/, '</div>') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jekyll-html-pipeline-1.1.0 | test/support/new_pipeline.rb |