aboutsummaryrefslogtreecommitdiffstats
path: root/library/Text_Highlighter/Text/Highlighter/Renderer/JSON.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-07 17:07:44 -0700
committerzotlabs <mike@macgirvin.com>2017-06-07 17:07:44 -0700
commit416a82bf121e568569ed28590092d34dd25da6c0 (patch)
treeface76b8cda01ebfe8a1d3090235f1b524b75761 /library/Text_Highlighter/Text/Highlighter/Renderer/JSON.php
parent40b9130c63fbcc5bfd4ba5feb5463000dfe99d43 (diff)
parent55836e8ca65ca9a2ae25591de3232470d7a50049 (diff)
downloadvolse-hubzilla-416a82bf121e568569ed28590092d34dd25da6c0.tar.gz
volse-hubzilla-416a82bf121e568569ed28590092d34dd25da6c0.tar.bz2
volse-hubzilla-416a82bf121e568569ed28590092d34dd25da6c0.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'library/Text_Highlighter/Text/Highlighter/Renderer/JSON.php')
-rw-r--r--library/Text_Highlighter/Text/Highlighter/Renderer/JSON.php86
1 files changed, 0 insertions, 86 deletions
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 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-/**
- * JSON renderer.
- *
- * Based on the HTML renderer by Andrey Demenev.
- *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt. If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
- *
- * @category Text
- * @package Text_Highlighter
- * @author Stoyan Stefanov <ssttoo@gmail.com>
- * @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 <ssttoo@gmail.com>
- * @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