Sha256: 78dd52218832f5dfa71357976f959b469f6ed1db35aad1013b6eb3a1c5a33d9f
Contents?: true
Size: 670 Bytes
Versions: 9
Compression:
Stored size: 670 Bytes
Contents
module Filters module PostFilter TIP_HTML = '<div class="alert tip">' NOTE_HTML = '<div class="alert note">' WARNING_HTML = '<div class="alert warning">' DANGER_HTML = '<div class="alert danger">' def format_admonitions!(html) html.gsub!(/<p>#{@front_wrap}#tip#{@end_wrap}<\/p>/, TIP_HTML) html.gsub!(/<p>#{@front_wrap}#note#{@end_wrap}<\/p>/, NOTE_HTML) html.gsub!(/<p>#{@front_wrap}#warning#{@end_wrap}<\/p>/, WARNING_HTML) html.gsub!(/<p>#{@front_wrap}#danger#{@end_wrap}<\/p>/, DANGER_HTML) html.gsub!(/<p>#{@front_wrap}\/(tip|note|warning|danger)#{@end_wrap}<\/p>/, Filters::CLOSE_DIV) end end end
Version data entries
9 entries across 9 versions & 1 rubygems