Skip to content
Merged
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
8 changes: 8 additions & 0 deletions plain_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ def check_section_for_linked_resources(section):
if len(link.node.children) != 1:
raise PlainSyntaxError(f"Plain syntax error: Link must have text specified (link: {link.node.target}).")

linked_resource_file_extension = os.path.splitext(os.path.basename(link.node.target))[1]
if linked_resource_file_extension == ".plain":
raise PlainSyntaxError(
f"Referenced resource '{link.node.target}' is a .plain file. "
f"Referencing .plain files through Linked Resources is not supported. "
"Please use the import section to include definitions or implementation/test requirements from another module."
)

linked_resources.append({"text": link.node.children[0].content, "target": link.node.target})

if linked_resources:
Expand Down
Loading