protected function parseQuotePairs($regexp, $leftQuote, $rightQuote)
	{
		preg_match_all($regexp, $this->text, $matches, PREG_OFFSET_CAPTURE);
		foreach ($matches[0] as $m)
		{
			$left  = $this->addTag($m[1], 1, $leftQuote);
			$right = $this->addTag($m[1] + strlen($m[0]) - 1, 1, $rightQuote);

			// Cascade left tag's invalidation to the right so that if we skip the left quote,
			// the right quote remains untouched
			$left->cascadeInvalidationTo($right);
		}
	}
protected function parseQuotePairs($regexp, $leftQuote, $rightQuote)
	{
		preg_match_all($regexp, $this->text, $matches, PREG_OFFSET_CAPTURE);
		foreach ($matches[0] as $m)
		{
			$left  = $this->addTag($m[1], 1, $leftQuote);
			$right = $this->addTag($m[1] + strlen($m[0]) - 1, 1, $rightQuote);

			// Cascade left tag's invalidation to the right so that if we skip the left quote,
			// the right quote remains untouched
			$left->cascadeInvalidationTo($right);
		}
	}
protected function parseQuotePairs ( $ regexp , $ leftQuote , $ rightQuote ) { preg_match_all ( $ regexp , $ this -> text , $ matches , PREG_OFFSET_CAPTURE ) ; foreach ( $ matches [ 0 ] as $ m ) { $ left = $ this -> addTag ( $ m [ 1 ] , 1 , $ leftQuote ) ; $ right = $ this -> addTag ( $ m [ 1 ] + strlen ( $ m [ 0 ] ) - 1 , 1 , $ rightQuote ) ; // Cascade left tag's invalidation to the right so that if we skip the left quote, // the right quote remains untouched $ left -> cascadeInvalidationTo ( $ right ) ; } }
Parse pairs of quotes

@param  string $regexp     Regexp used to identify quote pairs
@param  string $leftQuote  Fancy replacement for left quote
@param  string $rightQuote Fancy replacement for right quote
@return void
Parse pairs of quotes