diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-05-31 09:56:35 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-05-31 09:56:35 +0200 |
commit | 47d55694a4c84b6c12c0db61a69bcac8b671b20e (patch) | |
tree | b15e96f4ea67e2214a66a9d28dafaf53d25b98ec /library/markdownify/markdownify_cli.php | |
parent | 087f9784e3c5a860ed2b86e7f9e8e9f312038546 (diff) | |
parent | f0e615dee529e031663576286345141ad2996974 (diff) | |
download | volse-hubzilla-2.4.tar.gz volse-hubzilla-2.4.tar.bz2 volse-hubzilla-2.4.zip |
Merge branch '2.4RC'2.4
Diffstat (limited to 'library/markdownify/markdownify_cli.php')
-rwxr-xr-x | library/markdownify/markdownify_cli.php | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/library/markdownify/markdownify_cli.php b/library/markdownify/markdownify_cli.php deleted file mode 100755 index b3fffbd5c..000000000 --- a/library/markdownify/markdownify_cli.php +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/php -<?php -require dirname(__FILE__) .'/markdownify_extra.php'; - -function param($name, $default = false) { - if (!in_array('--'.$name, $_SERVER['argv'])) - return $default; - reset($_SERVER['argv']); - while (each($_SERVER['argv'])) { - if (current($_SERVER['argv']) == '--'.$name) - break; - } - $value = next($_SERVER['argv']); - if ($value === false || substr($value, 0, 2) == '--') - return true; - else - return $value; -} - - -$input = stream_get_contents(STDIN); - -$linksAfterEachParagraph = param('links'); -$bodyWidth = param('width'); -$keepHTML = param('html', true); - -if (param('no_extra')) { - $parser = new Markdownify($linksAfterEachParagraph, $bodyWidth, $keepHTML); -} else { - $parser = new Markdownify_Extra($linksAfterEachParagraph, $bodyWidth, $keepHTML); -} - -echo $parser->parseString($input) ."\n";
\ No newline at end of file |