diff --git a/lib/chunks/engines.rb b/lib/chunks/engines.rb index fe5a96a8..3b7b5bbe 100644 --- a/lib/chunks/engines.rb +++ b/lib/chunks/engines.rb @@ -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 diff --git a/lib/wiki_content.rb b/lib/wiki_content.rb index 85816aba..3e348837 100644 --- a/lib/wiki_content.rb +++ b/lib/wiki_content.rb @@ -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