Skip to content

Commit 1ccd65c

Browse files
committed
respect base_dir for libaries and resources in documentation server
1 parent fb3743d commit 1ccd65c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

robotcode/language_server/robotframework/diagnostics/library_doc.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,11 @@ def get_robot_library_html_doc_str(name: str, working_dir: str = ".", base_dir:
11271127

11281128
_update_env(working_dir)
11291129

1130+
if Path(name).suffix.lower() in ALLOWED_RESOURCE_FILE_EXTENSIONS:
1131+
name = find_file(name, working_dir, base_dir)
1132+
elif Path(name).suffix.lower() in ALLOWED_LIBRARY_FILE_EXTENSIONS:
1133+
name = find_file(name, working_dir, base_dir, file_type="Library")
1134+
11301135
robot_libdoc = LibraryDocumentation(name)
11311136
robot_libdoc.convert_docs_to_html()
11321137
with io.StringIO() as output:

0 commit comments

Comments
 (0)