This change pushes the responsibility of updating referencedIDs to its
callers where needed. The only caller of renameIDs is shortenIDs and
that works perfectly fine without updating its copy of referencedIDs.
In shortenIDs, we need to be able to lookup which nodes referenced the
"original ID" (and not the "new ID").
While shortenIDs *could* update referencedIDs so it remained valid, it
is extra complexity for no gain. As an example of this complexity,
imagine if two or more IDs are "rotated" like so:
Original IDs: a, bb, ccc, dddd
Mapping:
dddd -> ccc
ccc -> bb
bb -> a
a -> dddd
While doable within reasonable performance, we do not need to support
it at the moment, so there is no reason to handle that complexity.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| scour.py | ||
| svg_regex.py | ||
| svg_transform.py | ||
| yocto_css.py | ||