Remove unwanted <ruby> tag while generating module doc code

bug/bundler_fix
wchen-r7 2016-07-25 15:38:59 -05:00
parent df15eebdf8
commit 21f5da29d4
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,8 @@ module Redcarpet
class MsfMdHTML < Redcarpet::Render::HTML class MsfMdHTML < Redcarpet::Render::HTML
def block_code(code, language) def block_code(code, language)
code = $1 if code =~ /^<ruby>(.+)<\/ruby>/m
"<pre>" \ "<pre>" \
"<code>#{code}</code>" \ "<code>#{code}</code>" \
"</pre>" "</pre>"