From: Mark Story Date: Wed, 6 Apr 2011 01:06:58 +0000 (-0400) Subject: Making a capturing group non capturing, as the group isn't used. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=86bc75bfe46c9b476a65f26200284cd4c78c5afe;p=web%2Fkonrad%2Ftwig.git Making a capturing group non capturing, as the group isn't used. --- diff --git a/lib/Twig/Lexer.php b/lib/Twig/Lexer.php index 8df2324..eb7c4c2 100644 --- a/lib/Twig/Lexer.php +++ b/lib/Twig/Lexer.php @@ -179,7 +179,7 @@ class Twig_Lexer implements Twig_LexerInterface $trimTag = preg_quote($this->options['whitespace_trim'] . $this->options['tag_block'][1], '/'); $endTag = preg_quote($this->options['tag_block'][1], '/'); - if (empty($this->brackets) && preg_match('/\s*(' . $trimTag . '\h*|\s*' . $endTag . ')\n?/A', $this->code, $match, null, $this->cursor)) { + if (empty($this->brackets) && preg_match('/\s*(?:' . $trimTag . '\h*|\s*' . $endTag . ')\n?/A', $this->code, $match, null, $this->cursor)) { $this->pushToken(Twig_Token::BLOCK_END_TYPE); $this->moveCursor($match[0]); $this->state = self::STATE_DATA;