Module: Polytexnic::Postprocessor::Latex

Included in:
Polytexnic::Postprocessor
Defined in:
lib/polytexnic/postprocessors/latex.rb

Instance Method Summary collapse

Instance Method Details

#replace_hashes(polytex) ⇒ Object

Restores literal environments (verbatim, code, math, etc.).



8
9
10
11
12
13
14
15
# File 'lib/polytexnic/postprocessors/latex.rb', line 8

def replace_hashes(polytex)
  puts polytex if debug?
  polytex.tap do
    literal_cache.each do |key, value|
      polytex.gsub!(key, escape_backslashes(value))
    end
  end
end