protected function parseDashesAndEllipses()
	{
		if (strpos($this->text, '...') === false && strpos($this->text, '--') === false)
		{
			return;
		}

		$chrs = [
			'--'  => "\xE2\x80\x93",
			'---' => "\xE2\x80\x94",
			'...' => "\xE2\x80\xA6"
		];
		$regexp = '/---?|\\.\\.\\./S';
		preg_match_all($regexp, $this->text, $matches, PREG_OFFSET_CAPTURE);
		foreach ($matches[0] as $m)
		{
			$this->addTag($m[1], strlen($m[0]), $chrs[$m[0]]);
		}
	}
protected function parseDashesAndEllipses()
	{
		if (strpos($this->text, '...') === false && strpos($this->text, '--') === false)
		{
			return;
		}

		$chrs = [
			'--'  => "\xE2\x80\x93",
			'---' => "\xE2\x80\x94",
			'...' => "\xE2\x80\xA6"
		];
		$regexp = '/---?|\\.\\.\\./S';
		preg_match_all($regexp, $this->text, $matches, PREG_OFFSET_CAPTURE);
		foreach ($matches[0] as $m)
		{
			$this->addTag($m[1], strlen($m[0]), $chrs[$m[0]]);
		}
	}
protected function parseDashesAndEllipses ( ) { if ( strpos ( $ this -> text , '...' ) === false && strpos ( $ this -> text , '--' ) === false ) { return ; } $ chrs = [ '--' => "\xE2\x80\x93" , '---' => "\xE2\x80\x94" , '...' => "\xE2\x80\xA6" ] ; $ regexp = '/---?|\\.\\.\\./S' ; preg_match_all ( $ regexp , $ this -> text , $ matches , PREG_OFFSET_CAPTURE ) ; foreach ( $ matches [ 0 ] as $ m ) { $ this -> addTag ( $ m [ 1 ] , strlen ( $ m [ 0 ] ) , $ chrs [ $ m [ 0 ] ] ) ; } }
Parse dashes and ellipses

Does en dash –, em dash — and ellipsis …

@return void
Parse dashes and ellipses