Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Phar file which bundles Parsedown and the ToC Extension. #7

Open
KEINOS opened this issue Sep 17, 2019 · 0 comments
Open

Provide Phar file which bundles Parsedown and the ToC Extension. #7

KEINOS opened this issue Sep 17, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@KEINOS
Copy link
Owner

KEINOS commented Sep 17, 2019

By featuring the issue #4, one can install Parsedown-ToC via composer.

It might be handy if we provide a Phar file in bin directory of the package too. A Phar file which includes the latest extension and the working latest stable package of Parsedown.php tested.

If the bin directory is added to the env path($PATH) then the user can use it as a command.

In bash for example:

$ which parsedown-toc
~/.composer/vendor/bin/parsedown-toc
$
$ cat SAMPLE.md
# Title
## One
Sample data1
## Two
Sample data2

$ cat SAMPLE.md | parsedown-toc --toc
<ul>
<li><a href="#Title">Title</a>
<ul>
<li><a href="#One">One</a></li>
<li><a href="#Two">Two</a></li>
</ul></li>
</ul>

$ cat SAMPLE.md | parsedown-toc --body
<h1 id="Title" name="Title">Title</h1>
<h2 id="One" name="One">One</h2>
<p>Sample data1</p>
<h2 id="Two" name="Two">Two</h2>
<p>Sample data2</p>

$ cat SAMPLE.md | parsedown-toc --no-separator
<ul>
<li><a href="#Title">Title</a>
<ul>
<li><a href="#One">One</a></li>
<li><a href="#Two">Two</a></li>
</ul></li>
</ul>
<h1 id="Title" name="Title">Title</h1>
<h2 id="One" name="One">One</h2>
<p>Sample data1</p>
<h2 id="Two" name="Two">Two</h2>
<p>Sample data2</p>

@KEINOS KEINOS added the enhancement New feature or request label Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant