Class: Literal::Pre

Inherits:
Chunk::Abstract 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"

Instance Attribute Summary

Attributes inherited from Chunk::Abstract

#text

Class Method Summary collapse

Methods inherited from Chunk::Abstract

#initialize, #mask, #post_mask, #pre_mask, #revert, #unmask

Constructor Details

This class inherits a constructor from Chunk::Abstract

Class Method Details

.patternObject



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

def self.pattern() Regexp.new('<('+PRE_BLOCKS+')\b[^>]*?>.*?</\1>', Regexp::MULTILINE) end