Added comment to explain meaning of a regex.

This commit is contained in:
KB Jørgensen
2018-01-22 10:13:43 +01:00
parent 055198e28d
commit e055468f77

View File

@@ -598,6 +598,9 @@ svgEditor.addExtension("Connector", function(S) {
if('se:connector' in elem.attr) {
elem.attr['se:connector'] = elem.attr['se:connector'].split(' ')
.map(function(oldID){ return input.changes[oldID] }).join(' ');
// Check validity - the field would be something like 'svg_21 svg_22', but
// if one end is missing, it would be 'svg_21' and therefore fail this test
if(!/. ./.test(elem.attr['se:connector']))
remove.push(elem.attr.id);
}