Reimplementing Columns Management

This commit is contained in:
2026-03-08 12:03:07 +01:00
parent 30a77d1171
commit e01d2cd74b
16 changed files with 336 additions and 76 deletions

View File

@@ -276,11 +276,14 @@ def _get_attr(x, attr):
if isinstance(x, NotStr) and attr == "s":
# Special case for NotStr: return the name of the svg
svg = getattr(x, attr, MISSING_ATTR)
match = re.search(r'name\s*=\s*["\']([^"\']+)["\']', svg)
if match:
return f'<svg name="{match.group(1)}" />'
attr_value = getattr(x, attr, MISSING_ATTR)
if attr_value.strip().startswith("<svg "):
match = re.search(r'name\s*=\s*["\']([^"\']+)["\']', attr_value)
if match:
return f'<svg name="{match.group(1)}" />'
else:
return attr_value
return getattr(x, attr, MISSING_ATTR)