Made portals go through portals.

This commit is contained in:
sarah committed 2026-09-21 18:40:44 +02:00
1 parent 9dba722cd9
commit 82a728dc67
1 file changed
+4 -3
+4 -3
View File
@@ -41,7 +41,7 @@ def _FindLocalDefinitions(Content: str) -> dict[str, str]:
Captured = (
Line[: Match.start() - LineStart] + Line[Match.end() - LineStart :]
).strip()
LineDefinitions[Name] = Captured
LineDefinitions[Name] = _ResolveLocalPortals(Captured)
elif Match.group("BlockName"):
Name = Match.group("BlockName")
BlockOccurrences.setdefault(Name, []).append(Match)
@@ -51,9 +51,10 @@ def _FindLocalDefinitions(Content: str) -> dict[str, str]:
Open = Occurrences[0]
if len(Occurrences) >= 2:
Close = Occurrences[1]
BlockDefinitions[Name] = Content[Open.end() : Close.start()].strip("\n")
Captured = Content[Open.end() : Close.start()].strip("\n")
else:
BlockDefinitions[Name] = Content[Open.end() :].lstrip("\n")
Captured = Content[Open.end() :].lstrip("\n")
BlockDefinitions[Name] = _ResolveLocalPortals(Captured)
return {**LineDefinitions, **BlockDefinitions}