Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/techui_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ def _generate_json_map(
)

# Extract file path from file_elem
file_path = Path(file_elem.text.strip() if file_elem.text else "")
# Keep raw string to preserve urls
file_text = file_elem.text.strip() if file_elem.text else ""
file_path = Path(file_text)

# If file is already a .bob file, skip it
if not file_path.suffix == ".bob":
Expand All @@ -357,15 +359,18 @@ def _generate_json_map(
)
else:
child_node = JsonMap(
str(file_path),
file_text,
display_name,
exists=("IOC" in macro_dict or ("https:/" in str(file_path))),
exists=("IOC" in macro_dict or ("https://" in file_text)),
)

if widget_type == "embedded":
for embedded_child in child_node.children:
embedded_child.macros = {**embedded_child.macros, **macro_dict}
embedded_child.display_name = display_name
embedded_child.exists = "IOC" in macro_dict or (
"https://" in str(embedded_child.file)
)
current_node.children.append(embedded_child)

else:
Expand Down