aboutsummaryrefslogtreecommitdiffstats
path: root/library/markdownify/markdownify_cli.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-05 18:22:37 +1100
committerGitHub <noreply@github.com>2017-03-05 18:22:37 +1100
commit215bd07f0b23c03f8af0be7bee1d393f1821087d (patch)
tree26809ee07eeee05240878bd08cfb4fdcf4bb450a /library/markdownify/markdownify_cli.php
parent8e1716065ee01959fc799fa14ba627392a876afa (diff)
parent6c79e0c077971029343b2dff30017571ea118438 (diff)
downloadvolse-hubzilla-215bd07f0b23c03f8af0be7bee1d393f1821087d.tar.gz
volse-hubzilla-215bd07f0b23c03f8af0be7bee1d393f1821087d.tar.bz2
volse-hubzilla-215bd07f0b23c03f8af0be7bee1d393f1821087d.zip
Merge pull request #688 from dawnbreak/markdown
:arrow_up: :hammer: Upgrade Markdownify library.
Diffstat (limited to 'library/markdownify/markdownify_cli.php')
-rwxr-xr-xlibrary/markdownify/markdownify_cli.php33
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