class Card::Content::Chunk::KeepEscapedLiteral
These are basic chunks that have a pattern and can be protected. This chunk is used for markdown processing to ensure that the escaping survives the markdown rendering.
Constants
- FULL_RE
Public Class Methods
full_re(prefix)
click to toggle source
# File lib/card/content/chunk/keep_escaped_literal.rb, line 15 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/keep_escaped_literal.rb, line 19 def interpret match, _content @process_chunk = match[0].sub(/^\\(.)/, '\\\\\\\\\1') end