Merge pull request #2189 from benhanzl/move_rouge_loading
This commit is contained in:
commit
f3c54fcf50
|
@ -39,16 +39,6 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
module WithRouge
|
module WithRouge
|
||||||
require 'rouge'
|
|
||||||
require 'rouge/plugins/redcarpet'
|
|
||||||
|
|
||||||
if Rouge.version < '1.3.0'
|
|
||||||
abort "Please install Rouge 1.3.0 or greater and try running Jekyll again."
|
|
||||||
end
|
|
||||||
|
|
||||||
include Rouge::Plugins::Redcarpet
|
|
||||||
include CommonMethods
|
|
||||||
|
|
||||||
def block_code(code, lang)
|
def block_code(code, lang)
|
||||||
code = "<pre>#{super}</pre>"
|
code = "<pre>#{super}</pre>"
|
||||||
|
|
||||||
|
@ -77,6 +67,15 @@ module Jekyll
|
||||||
end
|
end
|
||||||
when 'rouge'
|
when 'rouge'
|
||||||
Class.new(Redcarpet::Render::HTML) do
|
Class.new(Redcarpet::Render::HTML) do
|
||||||
|
require 'rouge'
|
||||||
|
require 'rouge/plugins/redcarpet'
|
||||||
|
|
||||||
|
if Rouge.version < '1.3.0'
|
||||||
|
abort "Please install Rouge 1.3.0 or greater and try running Jekyll again."
|
||||||
|
end
|
||||||
|
|
||||||
|
include Rouge::Plugins::Redcarpet
|
||||||
|
include CommonMethods
|
||||||
include WithRouge
|
include WithRouge
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue