lib/polytexnic/literal.rb in polytexnic-0.9.4 vs lib/polytexnic/literal.rb in polytexnic-0.9.5

- old
+ new

@@ -35,11 +35,11 @@ ] end # Returns a list of all literal types. def literal_types - %w[verbatim Vertatim code metadcode] + math_environments + %w[verbatim Vertatim code metacode] + math_environments end # Handles environments that should be passed through the pipeline intact. # The includes verbatim environments ('verbatim', 'Verbatim') and all the # equation environments handled by MathJax ('equation', 'align', etc.). @@ -274,11 +274,11 @@ # pipeline intact. def cache_unicode(string) non_ascii_unicode = /([^\x00-\x7F]+)/ string.gsub!(non_ascii_unicode) do key = digest($1) - literal_cache[key] = $1 - xmlelement('unicode') { key } + unicode_cache[key] = $1 + key end end def element(literal_type) if math_environments.include?(literal_type)