Skip to content

Commit

Permalink
better document caveats on quoting/escaping
Browse files Browse the repository at this point in the history
note: GH does not support rendering rst admonitions

github/markup#68
  • Loading branch information
xflr6 committed Apr 16, 2022
1 parent 9a63a50 commit 25043ed
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ Save and render and view the result:
:align: center
:alt: round-table.svg

**Caveat:**
Backslash-escapes and strings of the form ``<...>``
have a special meaning in the DOT language.
If you need to render arbitrary strings (e.g. from user input),
check the details in the `user guide`_.


See also
--------
Expand Down Expand Up @@ -174,6 +180,8 @@ Development
.. _conda-forge-graphviz: https://anaconda.org/conda-forge/graphviz
.. _conda-forge-graphviz-feedstock: https://github.com/conda-forge/graphviz-feedstock

.. _user guide: https://graphviz.readthedocs.io/en/stable/manual.html

.. _pygraphviz: https://pypi.org/project/pygraphviz/
.. _graphviz-python: https://pypi.org/project/graphviz-python/
.. _graphviz-python-docs: https://www.graphviz.org/pdf/gv.3python.pdf
Expand Down
9 changes: 9 additions & 0 deletions docs/basic_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,12 @@ for the rendered file type.


.. include:: _links.rst

.. attention::

Backslash-escapes and strings of the form ``<...>``
have a special meaning in the DOT_ language
and are currently passed on as is by this library.
If you need to render arbitrary strings literally (e.g. from user input),
consider wraping them with the :func:`graphviz.escape` function first.
See the sections on :ref:`Escapes` and :ref:`Quoting` below for details.
4 changes: 4 additions & 0 deletions docs/manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ User Guide
.. include:: node_ports.rst


.. _Escapes:

.. include:: escapes.rst


.. _Quoting:

.. include:: quoting.rst


Expand Down

0 comments on commit 25043ed

Please sign in to comment.