[go: up one dir, main page]

Regression in id / <title> in svg for twopi

Steps to reproduce

$ echo "digraph { A -> B -> C }" > /tmp/simple.dot
$ dot -Tsvg -Ktwopi /tmp/simple.dot > /tmp/simple-twopi-git.svg
$ # Also run the above on a stable build of 2.44.1
$ diff -u /tmp/simple-twopi-stable.svg /tmp/simple-twopi-git.svg 
--- /tmp/simple-twopi-stable.svg	2020-12-14 01:58:42.310517803 -0800
+++ /tmp/simple-twopi-git.svg	2020-12-14 01:58:56.498488850 -0800
@@ -1,40 +1,40 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<!-- Generated by graphviz version 2.44.1 (20201121.0304)
+<!-- Generated by graphviz version 2.44.2~dev.20201129.1916 (20201129.1916)
  -->
 <!-- Pages: 1 -->
 <svg width="62pt" height="188pt"
  viewBox="0.00 0.00 62.00 188.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 184)">
 <polygon fill="white" stroke="transparent" points="-4,4 -4,-184 58,-184 58,4 -4,4"/>
-<!-- A -->
+<!-- %3 -->
 <g id="node1" class="node">
-<title>A</title>
+<title>%3</title>
 <ellipse fill="none" stroke="black" cx="27" cy="-18" rx="27" ry="18"/>
 <text text-anchor="middle" x="27" y="-14.3" font-family="Times,serif" font-size="14.00">A</text>
 </g>
-<!-- B -->
+<!-- %4 -->
 <g id="node2" class="node">
-<title>B</title>
+<title>%4</title>
 <ellipse fill="none" stroke="black" cx="27" cy="-90" rx="27" ry="18"/>
 <text text-anchor="middle" x="27" y="-86.3" font-family="Times,serif" font-size="14.00">B</text>
 </g>
-<!-- A&#45;&gt;B -->
+<!-- %3&#45;&gt;%4 -->
 <g id="edge1" class="edge">
-<title>A&#45;&gt;B</title>
+<title>%4:&#45;&gt;%4:</title>
 <path fill="none" stroke="black" d="M27,-36.17C27,-43.87 27,-53.03 27,-61.58"/>
 <polygon fill="black" stroke="black" points="23.5,-61.59 27,-71.59 30.5,-61.59 23.5,-61.59"/>
 </g>
-<!-- C -->
+<!-- %5 -->
 <g id="node3" class="node">
-<title>C</title>
+<title>%5</title>
 <ellipse fill="none" stroke="black" cx="27" cy="-162" rx="27" ry="18"/>
 <text text-anchor="middle" x="27" y="-158.3" font-family="Times,serif" font-size="14.00">C</text>
 </g>
-<!-- B&#45;&gt;C -->
+<!-- %4&#45;&gt;%5 -->
 <g id="edge2" class="edge">
-<title>B&#45;&gt;C</title>
+<title>%5:&#45;&gt;%5:</title>
 <path fill="none" stroke="black" d="M27,-108.17C27,-115.87 27,-125.03 27,-133.58"/>
 <polygon fill="black" stroke="black" points="23.5,-133.59 27,-143.59 30.5,-133.59 23.5,-133.59"/>
 </g>

simple.dot

simple-twopi-git.svg

simple-twopi-stable.svg

Expected Behaviour

Title elements should not have changed between versions. In viewers like chrome, the title is used as a tooltip, and provides accessibility (e.g. when rendered with small fonts).

Actual Behaviour

Title elements have been replaced with anonymous ids. This likely relates to the fix for #1767 (closed)

OS Version

Debian linux.

Additional info

It's worth noting that running this in plain dot doesn't suffer the same problem, which might indicate why this change hasn't been picked up in regression tests. Under plain, there are still additional : in edge titles. Possibly related to !1527 (merged) ?

$ diff -u simple-plain-stable.svg simple-plain-git.svg 
--- simple-plain-stable.svg	2020-12-14 10:14:58.000000000 +0000
+++ simple-plain-git.svg	2020-12-14 10:14:59.000000000 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<!-- Generated by graphviz version 2.44.1 (20201121.0304)
+<!-- Generated by graphviz version 2.44.2~dev.20201129.1916 (20201129.1916)
  -->
 <!-- Pages: 1 -->
 <svg width="62pt" height="188pt"
@@ -22,7 +22,7 @@
 </g>
 <!-- A&#45;&gt;B -->
 <g id="edge1" class="edge">
-<title>A&#45;&gt;B</title>
+<title>A:&#45;&gt;B:</title>
 <path fill="none" stroke="black" d="M27,-143.7C27,-135.98 27,-126.71 27,-118.11"/>
 <polygon fill="black" stroke="black" points="30.5,-118.1 27,-108.1 23.5,-118.1 30.5,-118.1"/>
 </g>
@@ -34,7 +34,7 @@
 </g>
 <!-- B&#45;&gt;C -->
 <g id="edge2" class="edge">
-<title>B&#45;&gt;C</title>
+<title>B:&#45;&gt;C:</title>
 <path fill="none" stroke="black" d="M27,-71.7C27,-63.98 27,-54.71 27,-46.11"/>
 <polygon fill="black" stroke="black" points="30.5,-46.1 27,-36.1 23.5,-46.1 30.5,-46.1"/>
 </g>

simple-plain-git.svg

simple-plain-stable.svg