Sha256: 7e5ab3e28e31e39673c28396c3722f6378694fcc45909850f11a52ca502588ae

Contents?: true

Size: 529 Bytes

Versions: 9

Compression:

Stored size: 529 Bytes

Contents

module Filters
  module PostFilter
    def format_admonitions!(html)
      html.gsub!(/<p>#{Filters.front_wrap}\s*#tip\s*#{Filters.end_wrap}<\/p>/,     '<div class="alert tip">')
      html.gsub!(/<p>#{Filters.front_wrap}\s*#warning\s*#{Filters.end_wrap}<\/p>/, '<div class="alert warning">')
      html.gsub!(/<p>#{Filters.front_wrap}\s*#error\s*#{Filters.end_wrap}<\/p>/,   '<div class="alert error">')
      html.gsub!(/<p>#{Filters.front_wrap}\s*\/(tip|warning|error)\s*#{Filters.end_wrap}<\/p>/, '</div>')
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
extended-markdown-filter-0.3.8 lib/filters/post/admonition.rb
extended-markdown-filter-0.3.7 lib/filters/post/admonition.rb
extended-markdown-filter-0.3.6 lib/filters/post/admonition.rb
extended-markdown-filter-0.3.5 lib/filters/post/admonition.rb
extended-markdown-filter-0.3.4 lib/filters/post/admonition.rb
extended-markdown-filter-0.3.3 lib/filters/post/admonition.rb
extended-markdown-filter-0.3.2 lib/filters/post/admonition.rb
extended-markdown-filter-0.3.1 lib/filters/post/admonition.rb
extended-markdown-filter-0.3.0 lib/filters/post/admonition.rb