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