mirror of
https://github.com/erusev/parsedown.git
synced 2024-09-20 12:01:29 +02:00
Remove CLI support from Parsedown.php
We'll just have the bin/parsedown version for CLI stuff. Trying to read from STDIN breaks the PHPUnit tests because PHPUnit runs at the CLI
This commit is contained in:
parent
9e4d5a8ea5
commit
5ca3745ba9
@ -13,20 +13,6 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
if (Parsedown::is_cli()) {
|
|
||||||
$file_mode = is_readable($argv[1]);
|
|
||||||
|
|
||||||
if ($file_mode) {
|
|
||||||
$str = file_get_contents($argv[1]);
|
|
||||||
} else {
|
|
||||||
$str = file_get_contents("php://stdin");
|
|
||||||
}
|
|
||||||
|
|
||||||
print Parsedown::instance()->parse($str);
|
|
||||||
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
class Parsedown
|
class Parsedown
|
||||||
{
|
{
|
||||||
# Multiton
|
# Multiton
|
||||||
|
Loading…
Reference in New Issue
Block a user