protected function getMagicEndPos($tagPos)
	{
		// Back up from given position to the cursor's position until we find a character that
		// is not whitespace
		while ($tagPos > $this->pos && strpos(self::WHITESPACE, $this->text[$tagPos - 1]) !== false)
		{
			--$tagPos;
		}

		return $tagPos;
	}
protected function getMagicEndPos($tagPos)
	{
		// Back up from given position to the cursor's position until we find a character that
		// is not whitespace
		while ($tagPos > $this->pos && strpos(self::WHITESPACE, $this->text[$tagPos - 1]) !== false)
		{
			--$tagPos;
		}

		return $tagPos;
	}
protected function getMagicEndPos ( $ tagPos ) { // Back up from given position to the cursor's position until we find a character that // is not whitespace while ( $ tagPos > $ this -> pos && strpos ( self :: WHITESPACE , $ this -> text [ $ tagPos - 1 ] ) !== false ) { -- $ tagPos ; } return $ tagPos ; }
Compute the position of a magic end tag, adjusted for whitespace

@param  integer $tagPos Rightmost possible position for the tag
@return integer
Compute the position of a magic end tag adjusted for whitespace