class Card::Content::Chunk::EscapedLiteral
These are basic chunks that have a pattern and can be protected. They are used by rendering process to prevent wiki rendering occuring within literal areas such as <code> and <pre> blocks and within HTML tags.
Constants
- FULL_RE
Public Class Methods
full_re(prefix)
click to toggle source
# File lib/card/content/chunk/escaped_literal.rb, line 16 def self.full_re prefix FULL_RE[prefix[1, 1]] end
Public Instance Methods
interpret(match, _content)
click to toggle source
# File lib/card/content/chunk/escaped_literal.rb, line 20 def interpret match, _content @process_chunk = match[0].sub(/^\\(.)/, format.escape_literal('\1')) end