diff --git a/lib/chunks/chunk.rb b/lib/chunks/chunk.rb index 0a4b96db..31806e44 100644 --- a/lib/chunks/chunk.rb +++ b/lib/chunks/chunk.rb @@ -45,12 +45,11 @@ module Chunk # Find all the chunks of the given type in content # Each time the pattern is matched, create a new - # chunk for it, and replace the occurance of the chunk + # chunk for it, and replace the occurrence of the chunk # in this content with its mask. def self.apply_to(content) text = content.to_str text.gsub!( self.pattern ) do |match| -# content.replace text new_chunk = self.new($~, content) content.add_chunk(new_chunk) new_chunk.mask diff --git a/lib/chunks/engines.rb b/lib/chunks/engines.rb index 1c72b266..b814d488 100644 --- a/lib/chunks/engines.rb +++ b/lib/chunks/engines.rb @@ -71,9 +71,11 @@ module Engines @content.options[:renderer].s5_theme = my_content.s5_theme my_content.to_s5 else + (t = Time.now; nil) html = Maruku.new(@content.delete("\r").to_utf8, {:math_enabled => true, :math_numbered => ['\\[','\\begin{equation}']}).to_html + (ApplicationController.logger.info("Maruku took " + (Time.now-t).to_s + " seconds."); nil) html.gsub(/\A