File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,6 +100,14 @@ def check_section_for_linked_resources(section):
100100 if len (link .node .children ) != 1 :
101101 raise PlainSyntaxError (f"Plain syntax error: Link must have text specified (link: { link .node .target } )." )
102102
103+ linked_resource_file_extension = os .path .splitext (os .path .basename (link .node .target ))[1 ]
104+ if linked_resource_file_extension == ".plain" :
105+ raise PlainSyntaxError (
106+ f"Referenced resource '{ link .node .target } ' is a .plain file. "
107+ f"Referencing .plain files through Linked Resources is not supported. "
108+ "Please use the import section to include definitions or implementation/test requirements from another module."
109+ )
110+
103111 linked_resources .append ({"text" : link .node .children [0 ].content , "target" : link .node .target })
104112
105113 if linked_resources :
You can’t perform that action at this time.
0 commit comments