work around a GraphViz 2.60.0 bug

* spot/twa/twagraph.cc (dump_storage_as_dot): Prefer \n over a plain
new line to work around GraphViz issue 1931, which was causing
twagraph-internals.ipynb to fail in our test suite.
This commit is contained in:
Alexandre Duret-Lutz 2021-02-03 17:10:41 +01:00
parent 244e3a9731
commit 4d23b7b770

View file

@ -896,9 +896,14 @@ namespace spot
if (!named_prop_.empty())
{
out << "namedprops [label=\"named properties:\n";
// GraphiViz 2.46.0 has a bug where plain newlines in
// quoted strings are ignored. See
// https://gitlab.com/graphviz/graphviz/-/issues/1931
// A workaround is to use emit \n instead of the
// actual new line.
out << "namedprops [label=\"named properties:\\n";
for (auto p: named_prop_)
escape_html(out, p.first) << '\n';
escape_html(out, p.first) << "\\n";
out << "\"]\n";
}
}