From 47524a710459c8ce4c3fb9b834cad35a8544cdce Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Mon, 22 Feb 2010 19:13:46 -0600 Subject: [PATCH] Small tweak to itex metal --- app/metal/itex.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/metal/itex.rb b/app/metal/itex.rb index 3d9e4121..b63c027a 100644 --- a/app/metal/itex.rb +++ b/app/metal/itex.rb @@ -20,8 +20,6 @@ class Itex case @params['display'] when 'block' filter = :block_filter - when 'inline' - filter = :inline_filter else filter = :inline_filter end @@ -31,8 +29,8 @@ class Itex eend = "" begin require 'itextomml' - itex2mml_parser = Itex2MML::Parser.new - itex2mml_parser.send(filter, tex).to_utf8 + @itex2mml_parser ||= Itex2MML::Parser.new + @itex2mml_parser.send(filter, tex).to_utf8 rescue LoadError estart + "Please install the itex2MML Ruby bindings." + eend rescue Itex2MML::Error => e