Skip to content

Commit 709ce46

Browse files
authored
Merge pull request #641 from FAIRmat-NFDI/writer-variable-attrs
handle variable-name attributes in writer
2 parents f50a827 + 4a991fd commit 709ce46

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)