Replacing some require statements with require_dependency
This commit is contained in:
parent
ad4c289ec5
commit
b49bc6a31d
|
@ -1,9 +1,6 @@
|
||||||
$: << File.dirname(__FILE__) + "../../lib"
|
$: << File.dirname(__FILE__) + "../../lib"
|
||||||
|
|
||||||
require 'redcloth'
|
require_dependency 'chunks/chunk'
|
||||||
require 'bluecloth_tweaked'
|
|
||||||
require 'rdocsupport'
|
|
||||||
require 'chunks/chunk'
|
|
||||||
|
|
||||||
# The markup engines are Chunks that call the one of RedCloth
|
# The markup engines are Chunks that call the one of RedCloth
|
||||||
# or RDoc to convert text. This markup occurs when the chunk is required
|
# or RDoc to convert text. This markup occurs when the chunk is required
|
||||||
|
@ -28,6 +25,7 @@ module Engines
|
||||||
|
|
||||||
class Textile < AbstractEngine
|
class Textile < AbstractEngine
|
||||||
def mask
|
def mask
|
||||||
|
require_dependency 'redcloth'
|
||||||
redcloth = RedCloth.new(@content, [:hard_breaks] + @content.options[:engine_opts])
|
redcloth = RedCloth.new(@content, [:hard_breaks] + @content.options[:engine_opts])
|
||||||
redcloth.filter_html = false
|
redcloth.filter_html = false
|
||||||
redcloth.no_span_caps = false
|
redcloth.no_span_caps = false
|
||||||
|
@ -37,12 +35,14 @@ module Engines
|
||||||
|
|
||||||
class Markdown < AbstractEngine
|
class Markdown < AbstractEngine
|
||||||
def mask
|
def mask
|
||||||
|
require_dependency 'bluecloth_tweaked'
|
||||||
BlueCloth.new(@content, @content.options[:engine_opts]).to_html
|
BlueCloth.new(@content, @content.options[:engine_opts]).to_html
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Mixed < AbstractEngine
|
class Mixed < AbstractEngine
|
||||||
def mask
|
def mask
|
||||||
|
require_dependency 'redcloth'
|
||||||
redcloth = RedCloth.new(@content, @content.options[:engine_opts])
|
redcloth = RedCloth.new(@content, @content.options[:engine_opts])
|
||||||
redcloth.filter_html = false
|
redcloth.filter_html = false
|
||||||
redcloth.no_span_caps = false
|
redcloth.no_span_caps = false
|
||||||
|
@ -52,6 +52,7 @@ module Engines
|
||||||
|
|
||||||
class RDoc < AbstractEngine
|
class RDoc < AbstractEngine
|
||||||
def mask
|
def mask
|
||||||
|
require_dependency 'rdocsupport'
|
||||||
RDocSupport::RDocFormatter.new(@content).to_html
|
RDocSupport::RDocFormatter.new(@content).to_html
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
require 'cgi'
|
require 'cgi'
|
||||||
require 'chunks/engines'
|
require_dependency 'chunks/engines'
|
||||||
require 'chunks/category'
|
require_dependency 'chunks/category'
|
||||||
require 'chunks/include'
|
require_dependency 'chunks/include'
|
||||||
require 'chunks/wiki'
|
require_dependency 'chunks/wiki'
|
||||||
require 'chunks/literal'
|
require_dependency 'chunks/literal'
|
||||||
require 'chunks/uri'
|
require_dependency 'chunks/uri'
|
||||||
require 'chunks/nowiki'
|
require_dependency 'chunks/nowiki'
|
||||||
|
|
||||||
# Wiki content is just a string that can process itself with a chain of
|
# Wiki content is just a string that can process itself with a chain of
|
||||||
# actions. The actions can modify wiki content so that certain parts of
|
# actions. The actions can modify wiki content so that certain parts of
|
||||||
|
|
Loading…
Reference in a new issue