Class: Texter::ArtTypographPreprocessor
- Inherits:
-
Preprocessor
- Object
- Preprocessor
- Texter::ArtTypographPreprocessor
- Defined in:
- app/lib/texter/art_typograph_preprocessor.rb
Instance Attribute Summary
Attributes inherited from Preprocessor
Instance Method Summary collapse
Methods inherited from Preprocessor
Constructor Details
This class inherits a constructor from Texter::Preprocessor
Instance Method Details
#call ⇒ Object
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 |