[wp-trac] Re: [WordPress Trac] #3833: Extra </p> inside blockquote

WordPress Trac wp-trac at lists.automattic.com
Fri May 15 01:30:00 GMT 2009


#3833: Extra </p> inside blockquote
-----------------------------------------------+----------------------------
 Reporter:  audwan                             |        Owner:  Archibald Leaurees
     Type:  defect (bug)                       |       Status:  new               
 Priority:  normal                             |    Milestone:  2.8               
Component:  Formatting                         |      Version:  2.7               
 Severity:  normal                             |   Resolution:                    
 Keywords:  has-patch tested needs-unit-tests  |  
-----------------------------------------------+----------------------------
Changes (by Denis-de-Bernardy):

  * keywords:  has-patch tested commit => has-patch tested needs-unit-tests


Comment:

 it's not too urgent, as these tickets have waited for years anyway.

 the preg_split() is actually mostly equivalent. this:

 {{{
 $pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates
 $pees = preg_split('/\n\s*\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);
 }}}

 is more or less the same as this, in a less optimized/generalized manner:

 {{{
 $pees = preg_split('/\n(?:\s*\n)+/', $pee, -1, PREG_SPLIT_NO_EMPTY);
 }}}

 semantically, it means the same: find double \n ignoring lines that have
 space chars. the suggested regex merely does a better job at it, and it's
 an optimization that can readily be removed if it's not wanted, since it
 has no effect on the ticket.

 anyway, I'm not too familiar with the unit tests api, so moving this over
 to needs-unit-tests... I totally agree a few are needed on this front.

 the patch is an improvement to the current behavior, however.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/3833#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list