module WordpressFormatting::Wpautop

Constants

ALLBLOCKS_CLOSE
ALLBLOCKS_OPEN
CLOSE_P
CRLF
EMPTY_P
HR
HTML_SPLIT

XXX: Simplified because the RegExp with comments and CDATA doesn't compile

MANY_NL
MULTIPLE_BR
NLBR
PRESERVE_NL
REMOVE_BLOCK_CLOSING
REMOVE_BLOCK_OPENING
REMOVE_BR
REMOVE_BR_SUBSET
SPLIT_NL
UNWRAP_BLOCKQUOTE
UNWRAP_LI
UNWRAP_P

Public Class Methods

included(base) click to toggle source

Allows to extend a class (like String) to perform WP formatting.

   # File lib/wordpress_formatting/wpautop.rb
45 def included(base)
46   base.class_eval do
47     def wpautop(br = true)
48       WordpressFormatting::Wpautop.wpautop(to_s, br)
49     end
50   end
51 end
wpautop(br = true) click to toggle source
   # File lib/wordpress_formatting/wpautop.rb
47 def wpautop(br = true)
48   WordpressFormatting::Wpautop.wpautop(to_s, br)
49 end