From 80c65ea8f3a9be9238125b7941ae7c875ea9a07c Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 30 May 2017 19:50:41 -0700 Subject: move code syntax highlighting to plugin --- .../Text/Highlighter/Renderer/JSON.php | 86 ---------------------- 1 file changed, 86 deletions(-) delete mode 100644 library/Text_Highlighter/Text/Highlighter/Renderer/JSON.php (limited to 'library/Text_Highlighter/Text/Highlighter/Renderer/JSON.php') diff --git a/library/Text_Highlighter/Text/Highlighter/Renderer/JSON.php b/library/Text_Highlighter/Text/Highlighter/Renderer/JSON.php deleted file mode 100644 index d4c926161..000000000 --- a/library/Text_Highlighter/Text/Highlighter/Renderer/JSON.php +++ /dev/null @@ -1,86 +0,0 @@ - - * @copyright 2006 Stoyan Stefanov - * @license http://www.php.net/license/3_0.txt PHP License - * @version CVS: $Id$ - * @link http://pear.php.net/package/Text_Highlighter - */ - -/** - * @ignore - */ - -require_once 'Text/Highlighter/Renderer.php'; -require_once 'Text/Highlighter/Renderer/Array.php'; - -/** - * JSON renderer, based on Andrey Demenev's HTML renderer. - * - * @author Stoyan Stefanov - * @category Text - * @package Text_Highlighter - * @copyright 2006 Stoyan Stefanov - * @license http://www.php.net/license/3_0.txt PHP License - * @version Release: 0.5.0 - * @link http://pear.php.net/package/Text_Highlighter - */ - -class Text_Highlighter_Renderer_JSON extends Text_Highlighter_Renderer_Array -{ - - /** - * Signals that no more tokens are available - * - * @abstract - * @access public - */ - function finalize() - { - - parent::finalize(); - $output = parent::getOutput(); - - $json_array = array(); - - foreach ($output AS $token) { - - if ($this->_enumerated) { - $json_array[] = '["' . $token[0] . '","' . $token[1] . '"]'; - } else { - $key = key($token); - $json_array[] = '{"class": "' . $key . '","content":"' . $token[$key] . '"}'; - } - - } - - $this->_output = '['. implode(',', $json_array) .']'; - $this->_output = str_replace("\n", '\n', $this->_output); - - } - - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * c-hanging-comment-ender-p: nil - * End: - */ - -?> \ No newline at end of file -- cgit v1.2.3