module Blocks BLOCK_TABLE = { ">>" => '
', "<<" => '
', ">||" => '
',
    "||<"     => '
', ">|code|" => '
',
    "|code|<" => '
' } def parse text block_rex = %r! (^>>)|(^<<) # blockquote | (^>\|\|)|(^\|\|<) # pre | (^\>\|code\|)|(^\|code\|\<) # google-code-prettify !x parse_text = text.gsub(block_rex){|s| BLOCK_TABLE[s]} return text if parse_text == nil parse_text end module_function :parse end