Skip to content

Commit

Permalink
Merge pull request #64 from mejo-/enh/standalone_option
Browse files Browse the repository at this point in the history
Add function `noStandalone` to disable `--standalone`
  • Loading branch information
patrickbaber authored Feb 28, 2023
2 parents fa1a575 + 1a2af0e commit c5f16d5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/Pandoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class Pandoc

protected $input;

protected $standalone = true;

protected $inputFile;

protected $from;
Expand Down Expand Up @@ -127,6 +129,14 @@ public function tocDepth($value)
public function standalone()
{
$this->option('standalone');
$this->standalone = true;

return $this;
}

public function noStandalone()
{
$this->standalone = false;

return $this;
}
Expand Down Expand Up @@ -197,10 +207,13 @@ public function execute(array $parameters = [])
public function run()
{
$parameters = [
'--standalone',
'--sandbox',
];

if ($this->standalone) {
array_push($parameters, '--standalone');
}

if ($this->inputFile) {
array_push($parameters, $this->inputFile);
}
Expand Down

0 comments on commit c5f16d5

Please sign in to comment.