Sha256: 297e2d7d914d5a145fa51bde46cc737fedc019f10f2f4ade9311518697ecdc1f
Contents?: true
Size: 374 Bytes
Versions: 1
Compression:
Stored size: 374 Bytes
Contents
# frozen_string_literal: true require 'html/pipeline' class HelpMarkdownFilter < HTML::Pipeline::MarkdownFilter def call html = super format_callout!(html) end def format_callout!(html) html.gsub!(%r{(?:<p>)?{{#(tip|warning|error)}}(?:</p>)?}, '<div class="alert \1">') html.gsub!(%r{(?:<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.1 | test/support/new_pipeline.rb |