class Kramdown::Parser::Kramdown
Public Instance Methods
configure_parser()
click to toggle source
# File lib/rabbit/parser/markdown.rb, line 22 def configure_parser position = @block_parsers.index(:codeblock_fenced) @block_parsers.insert(position, :codeblock_fenced_gfm) configure_parser_raw end
Also aliased as: configure_parser_raw
handle_extension(name, opts, body, type, line_no=nil)
click to toggle source
# File lib/rabbit/parser/markdown.rb, line 11 def handle_extension(name, opts, body, type, line_no=nil) case name when "wait" @tree.children << Element.new(:wait, body, nil, :category => type, :location => line_no) true else handle_extension_raw(name, opts, body, type, line_no) end end
Also aliased as: handle_extension_raw
parse_codeblock_fenced_gfm()
click to toggle source
# File lib/rabbit/parser/markdown.rb, line 31 def parse_codeblock_fenced_gfm original_match = self.class::FENCED_CODEBLOCK_MATCH begin self.class.send(:remove_const, :FENCED_CODEBLOCK_MATCH) self.class.const_set(:FENCED_CODEBLOCK_MATCH, GFM::FENCED_CODEBLOCK_MATCH) parse_codeblock_fenced ensure self.class.send(:remove_const, :FENCED_CODEBLOCK_MATCH) self.class.const_set(:FENCED_CODEBLOCK_MATCH, original_match) end end