Method: RedClothForTex#to_tex
- Defined in:
- lib/redcloth_for_tex.rb
#to_tex(lite = false) ⇒ Object
Generate tex.
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/redcloth_for_tex.rb', line 197 def to_tex( lite = false ) # make our working copy text = self.dup @urlrefs = {} @shelf = [] # incoming_entities text fix_entities text clean_white_space text get_refs text no_textile text unless lite lists text table text end glyphs text unless lite fold text block text end retrieve text encode_entities text text.gsub!(/\[\[(.*?)\]\]/, "\\1") text.gsub!(/_/, "\\_") text.gsub!( /<\/?notextile>/, '' ) # text.gsub!( /x%x%/, '&' ) # text.gsub!( /<br \/>/, "<br />\n" ) text.strip! text end |