Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds support for newlines in tooltips. The implemented behavior matches the behavior of Graphviz SVG output, but is not in-line with Graphviz documentation (i.e. Graphviz documentation differs from implementation). According to the documentation [1], tooltips are only supported for svg and cmap outputs and not xdot (here xdot.py deviates from the documentation, but for good reasons) and the value should be escString. escString should support newlines only for label, headlabel or taillabel attributes, not for tooltips [2]. Nevertheless, the svg output supports them. But, contrary to the documentation, SVG tooltips do not support capital letter escape sequences like \N, \G and \E. Only \n, \l, \r and \\ seem to be supported. The first three are all interpreted as a new line. Different alignments, specified by the documentation, are not distinguished. The same is implemented in this commit. [1]: https://graphviz.org/docs/attrs/tooltip/ [2]: https://graphviz.org/docs/attr-types/escString/
- Loading branch information