Skip to content

Commit

Permalink
add caveat about label escaping/quoting to .node() and `.render()…
Browse files Browse the repository at this point in the history
…` API docs

- see #168
  • Loading branch information
xflr6 committed Mar 6, 2024
1 parent e5578d3 commit 8cddcf1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions graphviz/dot.py
Expand Up @@ -191,6 +191,12 @@ def node(self, name: str,
name: Unique identifier for the node inside the source.
label: Caption to be displayed (defaults to the node ``name``).
attrs: Any additional node attributes (must be strings).
Attention:
When rendering ``label``, backslash-escapes
and strings of the form ``<...>`` have a special meaning.
See the sections :ref:`backslash-escapes` and
:ref:`quoting-and-html-like-labels` in the user guide for details.
"""
name = self._quote(name)
attr_list = self._attr_list(label, kwargs=attrs, attributes=_attributes)
Expand All @@ -216,6 +222,12 @@ def edge(self, tail_name: str, head_name: str,
by (optional) colon(s) into ``node`` name, ``port`` name,
and ``compass`` (e.g. ``sw``).
See :ref:`details in the User Guide <node-ports-compass>`.
Attention:
When rendering ``label``, backslash-escapes
and strings of the form ``<...>`` have a special meaning.
See the sections :ref:`backslash-escapes` and
:ref:`quoting-and-html-like-labels` in the user guide for details.
"""
tail_name = self._quote_edge(tail_name)
head_name = self._quote_edge(head_name)
Expand Down

0 comments on commit 8cddcf1

Please sign in to comment.