Closed derlin closed 4 months ago
From a super basic test, looks like it works:
⇒ echo "# Foo\n[TOC]\n## Bar\n### Baz\n## Bar2" | java -jar ~/Desktop/bitdowntoc-jvm-2.0.2-SNAPSHOT.jar -
# Foo
<!-- TOC start (generated with https://github.com/derlin/bitdowntoc) -->
- [Bar](#bar)
* [Baz](#baz)
- [Bar2](#bar2)
<!-- TOC end -->
<!-- TOC --><a name="bar"></a>
## Bar
<!-- TOC --><a name="baz"></a>
### Baz
<!-- TOC --><a name="bar2"></a>
## Bar2
And also ran it over a much more complex markdown file and it generated an equivalent TOC as the one from the online version, so LGTM! 👌🏻
bitdowntoc JVM can now read from stdin, by passing "-" as argument.
Note that this option is incompatible with '--inplace'. Also add tests for the cli.
Closes: #33