Class: Texter::ArtTypographPreprocessor

Inherits:
Preprocessor show all
Defined in:
app/lib/texter/art_typograph_preprocessor.rb

Instance Attribute Summary

Attributes inherited from Preprocessor

#body

Instance Method Summary collapse

Methods inherited from Preprocessor

#initialize

Constructor Details

This class inherits a constructor from Texter::Preprocessor

Instance Method Details

#callObject



3
4
5
6
7
8
9
# File 'app/lib/texter/art_typograph_preprocessor.rb', line 3

def call
  processed = ArtTypograph.process(body)
  processed.gsub! %r{</p>}m, "\n"
  processed.gsub! %r{<p.*?>}, ''
  processed.gsub! %r{</?(nobr|span).*?>}, ''
  processed.strip
end