# 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{(?:

)?{{#(tip|warning|error)}}(?:

)?}, '
') html.gsub!(%r{(?:

)?{{/(tip|warning|error)}}(?:

)?}, '
') end end