fix pygments failures, fall back to just <pre>
This commit is contained in:
parent
5fa59b1f76
commit
211c703e76
@ -9,7 +9,10 @@ class Sharkfrown
|
||||
class PygmentizeHTML < Redcarpet::Render::HTML
|
||||
def block_code(code, language)
|
||||
require 'pygmentize'
|
||||
Pygmentize.process(code, language)
|
||||
result = Pygmentize.process(code, language)
|
||||
result = "<pre>#{code}</pre>" if result.empty?
|
||||
|
||||
result
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user