Skip to content

Commit

Permalink
Merge pull request #10 from KEINOS/fix-issue9-exclude-unnecessary-files
Browse files Browse the repository at this point in the history
fix: #9 Exclude unnecessary files
  • Loading branch information
KEINOS committed Sep 21, 2019
2 parents a7a033e + 3591be2 commit 322d354
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
@@ -0,0 +1,9 @@
* text=auto

/samples export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore

/tests/* linguist-vendored
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -4,7 +4,7 @@

# Parsedown ToC

Listing Table of Contents Extension/Plugin for [Parsedown](http://parsedown.org/).
Listing Table of Contents Extension for [Parsedown](http://parsedown.org/).

This [simple PHP file](https://github.com/KEINOS/parsedown-extension_table-of-contents/blob/master/Extension.php) extends [Parsedown (vanilla)](https://github.com/erusev/parsedown) to generate a list of table of contents, aka ToC, from a markdown text given.

Expand All @@ -25,7 +25,6 @@ composer require keinos/parsedown-toc:1.0.0
composer require keinos/parsedown-toc:dev-master
```


- Usage: [See sample project](https://github.com/KEINOS/parsedown-extension_table-of-contents/tree/master/samples/composer)

### Manual Install (Download the script)
Expand Down Expand Up @@ -68,12 +67,13 @@ Sample text of head2-1.
EOL;

$Parsedown = new ParsedownToc();
$body = $Parsedown->text($textMarkdown);

$Body = $Parsedown->text($textMarkdown);
$ToC = $Parsedown->contentsList();

echo $ToC . PHP_EOL;
echo '<hr>' . PHP_EOL;
echo $body . PHP_EOL;
echo $Body . PHP_EOL;
```

### Result
Expand Down Expand Up @@ -102,7 +102,7 @@ echo $body . PHP_EOL;

## Upcoming feature

- [ ] `[toc]` markdown tag to insert the table of contents. ([Issue #2](https://github.com/KEINOS/parsedown-extension_table-of-contents/issues/2))
- [ ] `[toc]` markdown tag/element replacing it to the table of contents. ([Issue #2](https://github.com/KEINOS/parsedown-extension_table-of-contents/issues/2))

## References

Expand Down
5 changes: 4 additions & 1 deletion composer.json
Expand Up @@ -25,5 +25,8 @@
},
"type": "library",
"license": "MIT",
"minimum-stability": "stable"
"minimum-stability": "stable",
"archive": {
"exclude": ["/samples", "/tests", "/.travis.yml"]
}
}

0 comments on commit 322d354

Please sign in to comment.