https://bugzilla.wikimedia.org/show_bug.cgi?id=27936

✓ <andbe...@web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #8264|bug1.patch                  |bug27936.patch
           filename|                            |

--- Comment #2 from ✓ <andbe...@web.de> 2011-03-09 10:20:11 UTC ---
Comment on attachment 8264
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=8264
proposed patch

>Index: Preprocessor_DOM.php
>===================================================================
>--- Preprocessor_DOM.php       (Revision 83528)
>+++ Preprocessor_DOM.php       (Arbeitskopie)
>@@ -611,18 +611,12 @@
>                                       $piece->count -= $matchingCount;
>                                       # do we still qualify for any callback 
> with remaining count?
>-                                      $names = $rules[$piece->open]['names'];
>-                                      $skippedBraces = 0;
>-                                      $enclosingAccum =& $accum;
>-                                      while ( $piece->count ) {
>-                                              if ( array_key_exists( 
>$piece->count, $names ) ) {
>-                                                      $stack->push( $piece );
>-                                                      $accum =& 
>$stack->getAccum();
>-                                                      break;
>-                                              }
>-                                              --$piece->count;
>-                                              $skippedBraces ++;
>-                                      }
>-                                      $enclosingAccum .= str_repeat( 
>$piece->open, $skippedBraces );
>+                                      $min = $rules[$piece->open]['min'];
>+                                      if ( $piece->count >= $names->min ) {
>+                                              $stack->push( $piece );
>+                                              $accum =& $stack->getAccum();
>+                                      } else {
>+                                              $accum .= str_repeat( 
>$piece->open, $piece->count );
>+                                      }
>                               }
>                               $flags = $stack->getFlags();
>                               extract( $flags );
>Index: Preprocessor_Hash.php
>===================================================================
>--- Preprocessor_Hash.php      (Revision 83528)
>+++ Preprocessor_Hash.php      (Arbeitskopie)
>@@ -624,18 +624,12 @@
>                                       $piece->count -= $matchingCount;
>                                       # do we still qualify for any callback 
> with remaining count?
>-                                      $names = $rules[$piece->open]['names'];
>-                                      $skippedBraces = 0;
>-                                      $enclosingAccum =& $accum;
>-                                      while ( $piece->count ) {
>-                                              if ( array_key_exists( 
>$piece->count, $names ) ) {
>-                                                      $stack->push( $piece );
>-                                                      $accum =& 
>$stack->getAccum();
>-                                                      break;
>-                                              }
>-                                              --$piece->count;
>-                                              $skippedBraces ++;
>-                                      }
>-                                      $enclosingAccum->addLiteral( 
>str_repeat( $piece->open, $skippedBraces ) );
>+                                      $min = $rules[$piece->open]['min'];
>+                                      if ( $piece->count >= $min ) {
>+                                              $stack->push( $piece );
>+                                              $accum =& $stack->getAccum();
>+                                      } else {
>+                                              $accum .= str_repeat( 
>$piece->open, $piece->count );
>+                                      }
>                               }
> 
>                               extract( $stack->getFlags() );

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to