WP_Text_Diff_Renderer_inline

Better word splitting than the PEAR package provides.

Defined (1)

The class is defined in the following location(s).

/wp-includes/class-wp-text-diff-renderer-inline.php  
  1. class WP_Text_Diff_Renderer_inline extends Text_Diff_Renderer_inline { 
  2.  
  3. /** 
  4. * @ignore 
  5. * @since 2.6.0 
  6. * @param string $string 
  7. * @param string $newlineEscape 
  8. * @return string 
  9. */ 
  10. public function _splitOnWords($string, $newlineEscape = "\n") { 
  11. $string = str_replace("\0", '', $string); 
  12. $words = preg_split( '/([^\w])/u', $string, -1, PREG_SPLIT_DELIM_CAPTURE ); 
  13. $words = str_replace( "\n", $newlineEscape, $words ); 
  14. return $words; 
  15.