When translating a Graphviz file through gv2gxl, HTML-like and non-HTML-like
strings would be translated identically, resulting in a loss of information.
This was fixed in the series merged in
d44d19c86f0f469d1c76ce0d7630c8e0ac85e993.
However, to take this through to completion and make round-tripping such strings
possible, changes to gxl2gv were also required.
The present commit updates gxl2gv to recognize the new ‘kind’ GXL attribute that
gv2gxl uses to indicate a string originated as an HTML-like string. The output
of gxl2gv now correctly translates this back to an HTML-like string. Fixes #517.
Note that this fix is orthogonal to the behavior when using an HTML-like and
non-HTML-like string with the same content. It is still not possible to do this
without confusing the internal string interning dictionary (#2089).
- a Bashism removed from the Autotools build system
- when Criterion is available, the `command_line` test binary is no longer built
and installed by default, but rather during `make check`
+- round-tripping a file through ``gv2gxl`` and then ``gxl2gv`` no longer causes
+ HTML-like labels to become non-HTML like labels #517
## [2.47.3] - 2021-06-19
TAG_GRAPH,
TAG_NODE,
TAG_EDGE,
+ TAG_HTML_LIKE_STRING,
} attr_t;
typedef struct slist slist;
ud->globalAttrType = TAG_EDGE;
else if (strcmp("graph", atts[pos]) == 0)
ud->globalAttrType = TAG_GRAPH;
+ else if (strcmp("HTML-like string", atts[pos]) == 0)
+ ud->globalAttrType = TAG_HTML_LIKE_STRING;
} else {
ud->globalAttrType = TAG_NONE;
}
case TAG_GRAPH:
setGraphAttr(G, name, value, ud);
break;
+ case TAG_HTML_LIKE_STRING:
+ setAttr(name, value, ud, true);
+ break;
}
free(dynbuf);
ud->globalAttrType = TAG_NONE;
# Graphviz should not have caused a segfault
assert ret != -signal.SIGSEGV, "Graphviz segfaulted"
-@pytest.mark.xfail(strict=True)
@pytest.mark.skipif(shutil.which("gv2gxl") is None or
shutil.which("gxl2gv") is None,
reason="GXL tools not available")