Archiving a bunch of old stuff
This commit is contained in:
22
oldstuff/math-replay/lib/haml/filters-ext.rb
Normal file
22
oldstuff/math-replay/lib/haml/filters-ext.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
require 'haml/filters'
|
||||
require 'haml/helpers'
|
||||
|
||||
module Haml
|
||||
module Filters
|
||||
module Eqnarray
|
||||
include Base
|
||||
|
||||
def render(text)
|
||||
<<END
|
||||
<div class="eqnarray">
|
||||
$$
|
||||
\\begin{eqnarray}
|
||||
#{Haml::Helpers.html_escape(text).rstrip.gsub("\n", "\n ")}
|
||||
\\end{eqnarray}
|
||||
$$
|
||||
</div>
|
||||
END
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user