Skip to content

Commit

Permalink
Merge pull request #14 from adamtheturtle/document-file-types
Browse files Browse the repository at this point in the history
Document file types this works on
  • Loading branch information
adamtheturtle authored Sep 11, 2024
2 parents cdd27bf + 3b778a8 commit 705a0bf
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,43 @@ Usage example
# This will modify the README.md file in place
$ doccmd --language=go --command="gofmt -w" README.md
What does it work on?
---------------------

* reStructuredText (`.rst`)

.. code-block:: rst
.. code-block:: shell
echo "Hello, world!"
* Markdown (`.md`)

.. code-block:: markdown
```shell
echo "Hello, world!"
```
* MyST (`.md` with MyST syntax)

.. code-block:: markdown
```{code-block} shell
echo "Hello, world!"
```
* Want more? Open an issue!

TODO:

* Add documentation (automated, and link to it, and add pre-commits for Sphinx stuff, update urls.Source)
* Release pre-commit hook
* Verbose mode... "Running command "X" against README.rst example from line ..."
* Option to not delete file
* Document https://sybil.readthedocs.io/en/latest/rest.html#skipping-examples on docrun, and make it work
* https://github.com/simplistix/sybil/blob/master/sybil/parsers/rest/codeblock.py add .. code (not just code block), and same for MyST where it is even more popular

.. |Build Status| image:: https://github.com/adamtheturtle/doccmd/actions/workflows/ci.yml/badge.svg?branch=main
:target: https://github.com/adamtheturtle/doccmd/actions
Expand Down

0 comments on commit 705a0bf

Please sign in to comment.