[wp-trac] Re: [WordPress Trac] #9264: Self closing shortcodes

WordPress Trac wp-trac at lists.automattic.com
Mon May 25 11:13:35 GMT 2009


#9264: Self closing shortcodes
--------------------------+-------------------------------------------------
 Reporter:  rb-cohen      |       Owner:  westi                     
     Type:  defect (bug)  |      Status:  accepted                  
 Priority:  normal        |   Milestone:  2.8                       
Component:  Shortcodes    |     Version:  2.7.1                     
 Severity:  normal        |    Keywords:  has-patch needs-unit-tests
--------------------------+-------------------------------------------------

Comment(by rb-cohen):

 Replying to [comment:13 Denis-de-Bernardy]:
 > Replying to [comment:3 westi]:
 > > It would be good to see a patch to add these test cases to the
 shortcode tests:
 > >
 > > http://svn.automattic.com/wordpress-tests/wp-
 testcase/test_shortcode.php
 > >
 > > Then we can make sure the code changes satisfy the existing tests as
 well as these changes.
 >
 > It does, provided that the ?(:digit:) works on all platforms. never ran
 into this one, but if anyone is familiar with it and can confirm it's pcre
 standard than it should go right in.
 >
 > my understanding is it stands for "if we've 4 backrefs so far", and that
 would only be true if there is a /] around.

 I should have made a note about what it did. I *think* it's actually a
 conditional, checking whether group 4 was used and then looking for the
 end tag only if its not self closing.

 According to http://www.regular-expressions.info/conditional.html,
 conditionals are supported in pcre. Not sure if that helps?

 "Conditionals are supported by the JGsoft engine, Perl, PCRE and the .NET
 framework."

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


More information about the wp-trac mailing list