Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/redcloth_for_tex.rb

Overview

This is RedCloth (www.whytheluckystiff.net/ruby/redcloth/) converted by David Heinemeier Hansson to emit Tex

Instance Method Summary collapse

Instance Method Details

#texesc!(mode) ⇒ Object

Flexible HTML escaping



6
7
8
9
10
11
# File 'lib/redcloth_for_tex.rb', line 6

def texesc!( mode )
  gsub!( '&', '\\\\&' )
  gsub!( '%', '\%' )
  gsub!( '$', '\$' )
  gsub!( '~', '$\sim$' )
end