Class: HParser::Block::Pre

Inherits:
Pair
  • Object
show all
Includes:
Collectable, Indent, Hatena, Html, Latex
Defined in:
lib/hparser/block/pre.rb,
lib/hparser/html.rb,
lib/hparser/text.rb,
lib/hparser/latex.rb,
lib/hparser/hatena.rb

Overview

Pre format.

Constant Summary

Constants included from Html

Html::ESCAPE_TABLE

Instance Attribute Summary

Attributes inherited from Pair

#content

Instance Method Summary collapse

Methods included from Hatena

#to_hatena

Methods included from Indent

#_to_text_, #text_content, #to_text

Methods included from Text

#to_text

Methods included from Html

#escape, #to_html

Methods inherited from Pair

#==, get, #initialize, spliter

Constructor Details

This class inherits a constructor from HParser::Block::Pair

Instance Method Details

#hatena_filter(c) ⇒ Object



65
66
67
# File 'lib/hparser/hatena.rb', line 65

def hatena_filter c
  ">|\n"+c+"\n|<"
end

#to_latexObject



84
85
86
87
# File 'lib/hparser/latex.rb', line 84

def to_latex
  content = super
  %Q[\\begin{verbatim}\n#{content}\n\\end{verbatim}\n]
end