Sha256: 31083f3a82ec78b342481b792e714c609196c63d573300440ee148683077ccf3
Contents?: true
Size: 385 Bytes
Versions: 9
Compression:
Stored size: 385 Bytes
Contents
require 'escape_utils' module Gollum module Tex TEX_URL = "http://www.mathtran.org/cgi-bin/toy/" TEX_SIZES = { :inline => 2, :block => 4 } def self.to_html(tex, type = :inline) tex_uri = EscapeUtils.escape_uri(tex) tex_alt = EscapeUtils.escape_html(tex) %{<img src="#{TEX_URL}?D=#{TEX_SIZES[type]};tex=#{tex_uri}" alt="#{tex_alt}">} end end end
Version data entries
9 entries across 9 versions & 1 rubygems