Work around RDiscount bug where Markdown after Pygments-highlighted code would not be parsed as Markdown.

See http://gist.github.com/97682 for a runnable example of the bug.

Signed-off-by: Nick Quaranto <nick@quaran.to>
This commit is contained in:
Henrik N 2009-04-18 21:56:15 +02:00 committed by Nick Quaranto
parent e0477e32cc
commit 3c39612d84
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,9 @@ class Albino
end
def colorize(options = {})
execute @@bin + convert_options(options)
html = execute(@@bin + convert_options(options))
# Work around an RDiscount bug: http://gist.github.com/97682
html.to_s.sub(%r{</pre></div>\Z}, "</pre>\n</div>")
end
alias_method :to_s, :colorize