Class: ClWiki::FormatPreBlockquote
- Inherits:
-
CustomFormatter
- Object
- CustomFormatter
- ClWiki::FormatPreBlockquote
- Defined in:
- lib/cl_wiki/format_pre_blockquote.rb
Class Method Summary collapse
Class Method Details
.format_content(content, page) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/cl_wiki/format_pre_blockquote.rb', line 11 def self.format_content(content, page) content = CGI.escapeHTML(content) content.gsub!(/\[p\]\n/i, '<blockquote><pre>') content.gsub!(/\[p\]/i, '<blockquote><pre>') content.gsub!(%r{\[/p\]\n}i, '</pre></blockquote>') content.gsub!(%r{\[/p\]}i, '</pre></blockquote>') end |
.match_re ⇒ Object
7 8 9 |
# File 'lib/cl_wiki/format_pre_blockquote.rb', line 7 def self.match_re %r{\[p\].*?\[/p\]}mi end |