Some small efficiencies in the Chunk-handler

Also, log Maruku's processing time, out of perverse
interest.
This commit is contained in:
Jacques Distler 2011-08-05 01:59:18 -05:00
parent 52da76ff38
commit 14592f57f9
3 changed files with 6 additions and 4 deletions

View file

@ -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<div class="maruku_wrapper_div">\n?(.*?)\n?<\/div>\Z/m, '\1')
end
end