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
14 changes: 8 additions & 6 deletions src/techui_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,15 @@ def _get_display_name(
return display_name

def _next_file_crawl(
file_path: Path,
file_path_text: str,
destination_path: Path,
name_element: str | None,
component_name: str | None,
display_name: str | None,
macro_dictionary: dict[str, Any],
):
# TODO: misleading var name?
next_file_path = destination_path.joinpath(file_path)
next_file_path = destination_path.joinpath(file_path_text)

# Crawl the next file
if next_file_path.is_file():
Expand All @@ -304,9 +304,11 @@ def _next_file_crawl(
)
else:
child_node = JsonMap(
str(file_path),
file_path_text,
display_name,
exists=("IOC" in macro_dictionary or ("https:/" in str(file_path))),
exists=(
"IOC" in macro_dictionary or ("https://" in file_path_text)
),
)

return child_node
Expand Down Expand Up @@ -393,7 +395,7 @@ def _next_file_crawl(
)

child_node = _next_file_crawl(
file_path,
file_text,
dest_path,
name_elem,
current_component_name,
Expand Down Expand Up @@ -427,7 +429,7 @@ def _next_file_crawl(
)

child_node = _next_file_crawl(
file_path,
file_text,
dest_path,
name_elem,
current_component_name,
Expand Down