Class: Literal::Pre

Inherits:
AbstractLiteral show all
Defined in:
app/models/chunks/literal.rb

Overview

A literal chunk that protects ‘code’ and ‘pre’ tags from wiki rendering.

Constant Summary collapse

PRE_BLOCKS =
"a|pre|code"
PRE_PATTERN =
Regexp.new('<('+PRE_BLOCKS+')\b[^>]*?>.*?</\1>', Regexp::MULTILINE)

Instance Attribute Summary

Attributes inherited from Chunk::Abstract

#text, #unmask_mode, #unmask_text

Class Method Summary collapse

Methods inherited from AbstractLiteral

#initialize

Methods inherited from Chunk::Abstract

apply_to, #escaped?, #id, inherited, #initialize, #mask, mask_re, mask_string, #rendered?, #revert, #unmask

Constructor Details

This class inherits a constructor from Literal::AbstractLiteral

Class Method Details

.patternObject



22
# File 'app/models/chunks/literal.rb', line 22

def self.pattern() PRE_PATTERN end