framework/utils/CMarkdownParser.php
protected function createHighLighter($options)
	{
		if(!class_exists('Text_Highlighter', false))
		{
			require_once(Yii::getPathOfAlias('system.vendors.TextHighlighter.Text.Highlighter').'.php');
			require_once(Yii::getPathOfAlias('system.vendors.TextHighlighter.Text.Highlighter.Renderer.Html').'.php');
		}
		$lang = current(preg_split('/\s+/', substr(substr($options,1), 0,-1),2));
		$highlighter = Text_Highlighter::factory($lang);
		if($highlighter)
			$highlighter->setRenderer(new Text_Highlighter_Renderer_Html($this->getHighlightConfig($options)));
		return $highlighter;
	}
protected function createHighLighter($options)
	{
		if(!class_exists('Text_Highlighter', false))
		{
			require_once(Yii::getPathOfAlias('system.vendors.TextHighlighter.Text.Highlighter').'.php');
			require_once(Yii::getPathOfAlias('system.vendors.TextHighlighter.Text.Highlighter.Renderer.Html').'.php');
		}
		$lang = current(preg_split('/\s+/', substr(substr($options,1), 0,-1),2));
		$highlighter = Text_Highlighter::factory($lang);
		if($highlighter)
			$highlighter->setRenderer(new Text_Highlighter_Renderer_Html($this->getHighlightConfig($options)));
		return $highlighter;
	}
protected function createHighLighter ( $ options ) { if ( ! class_exists ( 'Text_Highlighter' , false ) ) { require_once ( Yii :: getPathOfAlias ( 'system.vendors.TextHighlighter.Text.Highlighter' ) . '.php' ) ; require_once ( Yii :: getPathOfAlias ( 'system.vendors.TextHighlighter.Text.Highlighter.Renderer.Html' ) . '.php' ) ; } $ lang = current ( preg_split ( '/\s+/' , substr ( substr ( $ options , 1 ) , 0 , - 1 ) , 2 ) ) ; $ highlighter = Text_Highlighter :: factory ( $ lang ) ; if ( $ highlighter ) $ highlighter -> setRenderer ( new Text_Highlighter_Renderer_Html ( $ this -> getHighlightConfig ( $ options ) ) ) ; return $ highlighter ; }
Creates a highlighter instance.
@param string $options the user-entered options
@return Text_Highlighter the highlighter instance
Creates a highlighter instance .