- `gxl2gv`, when dealing with `name` attributes, may be less likely to crash. We
say “may be less likely” because a bug remains that makes a crash still
the most likely outcome. #2300
+- Gradient URL references in SVG output once again align with their targets
+ (linear or radial gradients) when `id` attributes are in use. This was
+ arguably a regression in Graphviz 6.0.1. #2307
## [7.0.1] – 2022-11-09
gvputs(job, " fill=\"");
if (filled == GRADIENT) {
- gvprintf(job, "url(#l_%d)", gid);
+ gvputs(job, "url(#");
+ if (obj->id != NULL) {
+ gvputs_xml(job, obj->id);
+ gvputc(job, '_');
+ }
+ gvprintf(job, "l_%d)", gid);
} else if (filled == RGRADIENT) {
- gvprintf(job, "url(#r_%d)", gid);
+ gvputs(job, "url(#");
+ if (obj->id != NULL) {
+ gvputs_xml(job, obj->id);
+ gvputc(job, '_');
+ }
+ gvprintf(job, "r_%d)", gid);
} else if (filled) {
svg_print_paint(job, obj->fillcolor);
if (obj->fillcolor.type == RGBA_BYTE
# ask `gxl2gv` to process this
subprocess.check_call(["gxl2gv", input])
-@pytest.mark.xfail(strict=True)
def test_2307():
"""
'id' attribute should be propagated to 'url' links in SVG output