class PseudoHiki::MarkDownFormat::VerbatimNodeFormatter
Public Instance Methods
gfm_verbatim(element)
click to toggle source
# File lib/pseudohiki/markdownformat.rb, line 282 def gfm_verbatim(element) element.tap do |lines| lines.unshift "```#{$/}" lines.push "```#{$/ * 2}" end end
md_verbatim(element)
click to toggle source
# File lib/pseudohiki/markdownformat.rb, line 289 def md_verbatim(element) element.join.gsub(/^/o, " ").sub(/ \Z/o, "").concat $/ end
visit(tree, memo)
click to toggle source
Calls superclass method
# File lib/pseudohiki/markdownformat.rb, line 276 def visit(tree, memo) element = super(tree, memo) return gfm_verbatim(element) if @options.gfm_style md_verbatim(element) end