Cannot object-set-attribute with a value containing commas
Summary:
I'm trying to set the d
attribute of a path with the object-set-attribute
action through command line.
It fails with action:object_set_attribute: requires 'attribute name, attribute value'
Steps to reproduce:
inkscape --with-gui --actions="select-by-id:foobar;object-set-attribute:d,m 0,0;" myfile.svg
What happened?
It fails with action:object_set_attribute: requires 'attribute name, attribute value'
The problem comes from the GLib.Regex.split_simple
function which should split only one comma :
https://gitlab.com/inkscape/inkscape/-/blob/master/src/actions/actions-object.cpp#L35
Not sure, but something like : GLib.Regex.prototype.split_full
with max_tokens=1
could fix it?
What should have happened?
It should correctly set the attribute
Version info`
Tested with: Inkscape 1.1.2 (0a00cf53, 2022-02-04) Inkscape 1.2 (dc2aedaf, 2022-05-15)