protected function matchSetextLines()
	{
		if ($this->text->indexOf('-') === false && $this->text->indexOf('=') === false)
		{
			return;
		}

		// Capture the any series of - or = alone on a line, optionally preceded with the
		// angle brackets notation used in blockquotes
		$regexp = '/^(?=[-=>])(?:> ?)*(?=[-=])(?:-+|=+) *$/m';
		if (!preg_match_all($regexp, $this->text, $matches, PREG_OFFSET_CAPTURE))
		{
			return;
		}

		foreach ($matches[0] as list($match, $matchPos))
		{
			// Compute the position of the end tag. We start on the LF character before the
			// match and keep rewinding until we find a non-space character
			$endPos = $matchPos - 1;
			while ($endPos > 0 && $this->text->charAt($endPos - 1) === ' ')
			{
				--$endPos;
			}

			// Store at the offset of the LF character
			$this->setextLines[$matchPos - 1] = [
				'endLen'     => $matchPos + strlen($match) - $endPos,
				'endPos'     => $endPos,
				'quoteDepth' => substr_count($match, '>'),
				'tagName'    => ($match[0] === '=') ? 'H1' : 'H2'
			];
		}
	}
protected function matchSetextLines()
	{
		if ($this->text->indexOf('-') === false && $this->text->indexOf('=') === false)
		{
			return;
		}

		// Capture the any series of - or = alone on a line, optionally preceded with the
		// angle brackets notation used in blockquotes
		$regexp = '/^(?=[-=>])(?:> ?)*(?=[-=])(?:-+|=+) *$/m';
		if (!preg_match_all($regexp, $this->text, $matches, PREG_OFFSET_CAPTURE))
		{
			return;
		}

		foreach ($matches[0] as list($match, $matchPos))
		{
			// Compute the position of the end tag. We start on the LF character before the
			// match and keep rewinding until we find a non-space character
			$endPos = $matchPos - 1;
			while ($endPos > 0 && $this->text->charAt($endPos - 1) === ' ')
			{
				--$endPos;
			}

			// Store at the offset of the LF character
			$this->setextLines[$matchPos - 1] = [
				'endLen'     => $matchPos + strlen($match) - $endPos,
				'endPos'     => $endPos,
				'quoteDepth' => substr_count($match, '>'),
				'tagName'    => ($match[0] === '=') ? 'H1' : 'H2'
			];
		}
	}
protected function matchSetextLines ( ) { if ( $ this -> text -> indexOf ( '-' ) === false && $ this -> text -> indexOf ( '=' ) === false ) { return ; } // Capture the any series of - or = alone on a line, optionally preceded with the // angle brackets notation used in blockquotes $ regexp = '/^(?=[-=>])(?:> ?)*(?=[-=])(?:-+|=+) *$/m' ; if ( ! preg_match_all ( $ regexp , $ this -> text , $ matches , PREG_OFFSET_CAPTURE ) ) { return ; } foreach ( $ matches [ 0 ] as list ( $ match , $ matchPos ) ) { // Compute the position of the end tag. We start on the LF character before the // match and keep rewinding until we find a non-space character $ endPos = $ matchPos - 1 ; while ( $ endPos > 0 && $ this -> text -> charAt ( $ endPos - 1 ) === ' ' ) { -- $ endPos ; } // Store at the offset of the LF character $ this -> setextLines [ $ matchPos - 1 ] = [ 'endLen' => $ matchPos + strlen ( $ match ) - $ endPos , 'endPos' => $ endPos , 'quoteDepth' => substr_count ( $ match , '>' ) , 'tagName' => ( $ match [ 0 ] === '=' ) ? 'H1' : 'H2' ] ; } }
Capture and store lines that contain a Setext-tyle header

@return void
Capture and store lines that contain a Setext - tyle header