Class: NoWiki
- Inherits:
-
Chunk::Abstract
- Object
- Chunk::Abstract
- NoWiki
- Defined in:
- app/models/chunks/nowiki.rb
Overview
This chunks allows certain parts of a wiki page to be hidden from the rest of the rendering pipeline. It should be run at the beginning of the pipeline in ‘wiki_content.rb`.
An example use of this chunk is to markup double brackets or auto URI links:
<nowiki>Here are [[double brackets]] and a URI: www.uri.org</nowiki>
The contents of the chunks will not be processed by any other chunk so the ‘www.uri.org` and the double brackets will appear verbatim.
Author: Mark Reid <mark at threewordslong dot com> Created: 8th June 2004
Constant Summary collapse
- NOWIKI_PATTERN =
Regexp.new('<nowiki>(.*?)</nowiki>', Regexp::MULTILINE)
Instance Attribute Summary collapse
-
#plain_text ⇒ Object
readonly
Returns the value of attribute plain_text.
Attributes inherited from Chunk::Abstract
#text, #unmask_mode, #unmask_text
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(match_data, content) ⇒ NoWiki
constructor
A new instance of NoWiki.
Methods inherited from Chunk::Abstract
apply_to, #escaped?, #id, inherited, #mask, mask_re, mask_string, #rendered?, #revert, #unmask
Constructor Details
#initialize(match_data, content) ⇒ NoWiki
Returns a new instance of NoWiki.
23 24 25 26 |
# File 'app/models/chunks/nowiki.rb', line 23 def initialize(match_data, content) super @plain_text = @unmask_text = match_data[1] end |
Instance Attribute Details
#plain_text ⇒ Object (readonly)
Returns the value of attribute plain_text.
21 22 23 |
# File 'app/models/chunks/nowiki.rb', line 21 def plain_text @plain_text end |
Class Method Details
.pattern ⇒ Object
19 |
# File 'app/models/chunks/nowiki.rb', line 19 def self.pattern() NOWIKI_PATTERN end |