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:
parent
e0477e32cc
commit
3c39612d84
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue