Skip to content

Commit 4a991fd

Browse files
committed
handle variable-name attributes in writer
1 parent f50a827 commit 4a991fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pynxtools/dataconverter/helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,10 @@ def get_regex():
590590
results = get_regex().search(entry)
591591
if results is None:
592592
return entry
593+
593594
if entry[0] == "@":
594-
return "@" + results.group(1)
595+
name = results.group(1)
596+
return name if name.startswith("@") else "@" + name
595597
return results.group(1)
596598

597599

0 commit comments

Comments
 (0)