Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
cf0668eb53
|
@ -1,4 +1,4 @@
|
|||
# Allow the metal piece to run in isolation
|
||||
# Allow the metal piece to run in isolation
|
||||
require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails)
|
||||
|
||||
require 'stringsupport'
|
||||
|
@ -16,9 +16,17 @@ class Itex
|
|||
|
||||
def self.response(env)
|
||||
@params = Rack::Request.new(env).params
|
||||
tex = @params['tex'].purify
|
||||
display = @params['display'] || 'inline'
|
||||
filter = (display + '_filter').to_sym
|
||||
tex = (@params['tex'] || '').purify
|
||||
case @params['display']
|
||||
when 'block'
|
||||
filter = :block_filter
|
||||
when 'inline'
|
||||
filter = :inline_filter
|
||||
else
|
||||
filter = :inline_filter
|
||||
end
|
||||
return "<math xmlns='http://www.w3.org/1998/Math/MathML' display='" +
|
||||
filter.to_s[/(.*?)_filter/] + "'/>" if tex.strip == ''
|
||||
estart = "<math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><merror><mtext>"
|
||||
eend = "</mtext></merror></math>"
|
||||
begin
|
||||
|
|
Loading…
Reference in a new issue