WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #19855, comment 4


Ignore:
Timestamp:
01/20/12 00:42:19 (3 years ago)
Author:
kurtpayne
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19855, comment 4

    initial v1  
    22> Coding this wouldn't be hard: `preg_split('|</?pre[ >]|', $pee, -1, PREG_SPLIT_DELIM_CAPTURE)`, then go through the array and replace strings starting with `<pre` with incremental placeholder, keeping them for later in an `array('placeholder_#' => 'string', ...)`. 
    33 
    4 I used preg_match instead of preg_split.  I didn't see a performance a significant performance difference either way.  Let me know if you see any problems with the patch.  The sample content did not work before the patch, and worked fine with the patch. 
     4I used preg_match_all instead of preg_split.  I didn't see a performance a significant performance difference either way.  Let me know if you see any problems with the patch.  The sample content did not work before the patch, and worked fine with the patch.