From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- framework/Web/UI/WebControls/TMarkdown.php | 148 ++++++++++++++--------------- 1 file changed, 74 insertions(+), 74 deletions(-) (limited to 'framework/Web/UI/WebControls/TMarkdown.php') diff --git a/framework/Web/UI/WebControls/TMarkdown.php b/framework/Web/UI/WebControls/TMarkdown.php index 3aa1c9be..726a1ebe 100644 --- a/framework/Web/UI/WebControls/TMarkdown.php +++ b/framework/Web/UI/WebControls/TMarkdown.php @@ -1,75 +1,75 @@ - - * @link http://www.pradosoft.com/ + + * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2012 PradoSoft - * @license http://www.pradosoft.com/license/ - * @version $Id$ - * @package System.Web.UI.WebControls - */ - -/** - * Using TTextHighlighter and MarkdownParser classes - */ -Prado::using('System.Web.UI.WebControls.TTextHighlighter'); -Prado::using('System.3rdParty.Markdown.MarkdownParser'); - -/** - * TMarkdown class - * - * TMarkdown is a control that produces HTML from code with markdown syntax. - * - * Markdown is a text-to-HTML conversion tool for web writers. Markdown allows - * you to write using an easy-to-read, easy-to-write plain text format, then - * convert it to structurally valid XHTML (or HTML). - * Further documentation regarding Markdown can be found at - * http://daringfireball.net/projects/markdown/ - * - * To use TMarkdown, simply enclose the content to be rendered within - * the body of TMarkdown in a template. - * - * See http://www.pradosoft.com/demos/quickstart/?page=Markdown for - * details on the Markdown syntax usage. - * - * TMarkdown also performs syntax highlighting for code blocks whose language - * is recognized by {@link TTextHighlighter}. - * The language of a code block must be specified in the first line of the block - * and enclosed within a pair of square brackets (e.g. [php]). - * - * @author Wei Zhuo - * @version $Id$ - * @package System.Web.UI.WebControls - * @since 3.0.1 - */ -class TMarkdown extends TTextHighlighter -{ - /** - * Processes a text string. - * This method is required by the parent class. - * @param string text string to be processed - * @return string the processed text result - */ - public function processText($text) - { - $renderer = new MarkdownParser; - $result = $renderer->parse($text); - return preg_replace_callback( - '/
\[\s*(\w+)\s*\]\n+((.|\n)*?)\s*<\\/code><\\/pre>/im',
-				array($this, 'highlightCode'), $result);
-	}
-
-	/**
-	 * Highlights source code using TTextHighlighter
-	 * @param array matches of code blocks
-	 * @return string highlighted code.
-	 */
-	protected function highlightCode($matches)
-	{
-		$text = html_entity_decode($matches[2],ENT_QUOTES,'UTF-8');
-		$this->setLanguage($matches[1]);
-		return parent::processText($text);
-	}
-}
-
+ * @license http://www.pradosoft.com/license/
+ * @version $Id$
+ * @package System.Web.UI.WebControls
+ */
+
+/**
+ * Using TTextHighlighter and MarkdownParser classes
+ */
+Prado::using('System.Web.UI.WebControls.TTextHighlighter');
+Prado::using('System.3rdParty.Markdown.MarkdownParser');
+
+/**
+ * TMarkdown class
+ *
+ * TMarkdown is a control that produces HTML from code with markdown syntax.
+ *
+ * Markdown is a text-to-HTML conversion tool for web writers. Markdown allows
+ * you to write using an easy-to-read, easy-to-write plain text format, then
+ * convert it to structurally valid XHTML (or HTML).
+ * Further documentation regarding Markdown can be found at
+ * http://daringfireball.net/projects/markdown/
+ *
+ * To use TMarkdown, simply enclose the content to be rendered within
+ * the body of TMarkdown in a template.
+ *
+ * See http://www.pradosoft.com/demos/quickstart/?page=Markdown for
+ * details on the Markdown syntax usage.
+ *
+ * TMarkdown also performs syntax highlighting for code blocks whose language
+ * is recognized by {@link TTextHighlighter}.
+ * The language of a code block must be specified in the first line of the block
+ * and enclosed within a pair of square brackets (e.g. [php]).
+ *
+ * @author Wei Zhuo 
+ * @version $Id$
+ * @package System.Web.UI.WebControls
+ * @since 3.0.1
+ */
+class TMarkdown extends TTextHighlighter
+{
+	/**
+	 * Processes a text string.
+	 * This method is required by the parent class.
+	 * @param string text string to be processed
+	 * @return string the processed text result
+	 */
+	public function processText($text)
+	{
+		$renderer = new MarkdownParser;
+		$result = $renderer->parse($text);
+		return preg_replace_callback(
+				'/
\[\s*(\w+)\s*\]\n+((.|\n)*?)\s*<\\/code><\\/pre>/im',
+				array($this, 'highlightCode'), $result);
+	}
+
+	/**
+	 * Highlights source code using TTextHighlighter
+	 * @param array matches of code blocks
+	 * @return string highlighted code.
+	 */
+	protected function highlightCode($matches)
+	{
+		$text = html_entity_decode($matches[2],ENT_QUOTES,'UTF-8');
+		$this->setLanguage($matches[1]);
+		return parent::processText($text);
+	}
+}
+
-- 
cgit v1.2.3