summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--trivium.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/trivium.rb b/trivium.rb
index fc5d652..2470a00 100644
--- a/trivium.rb
+++ b/trivium.rb
@@ -91,12 +91,9 @@ class Dots < String
 end
 
 def format(e)
-  RubyPants.new(
-  BlueCloth.new(
-  Dots.new(
-  InlineMath.new(
-    e[:body]
-  ).to_html).to_html).to_html).to_html
+  [InlineMath, Dots, BlueCloth, RubyPants].inject(e[:body]) { |a,e|
+    e.new(a).to_html
+  }
 end
 
 def template(template, data)