Skip to content

Commit 8210bd9

Browse files
committed
fix(robotlangserver): generating documentation view with parameters that contains .py at the at does not work
1 parent 30b9ede commit 8210bd9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

robotcode/language_server/robotframework/diagnostics/library_doc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ def find_library(
11571157

11581158

11591159
def get_robot_library_html_doc_str(
1160-
name: str, working_dir: str = ".", base_dir: str = ".", theme: Optional[str] = None
1160+
name: str, args: Optional[str], working_dir: str = ".", base_dir: str = ".", theme: Optional[str] = None
11611161
) -> str:
11621162
from robot.libdocpkg import LibraryDocumentation
11631163
from robot.libdocpkg.htmlwriter import LibdocHtmlWriter
@@ -1169,7 +1169,7 @@ def get_robot_library_html_doc_str(
11691169
elif Path(name).suffix.lower() in ALLOWED_LIBRARY_FILE_EXTENSIONS:
11701170
name = find_file(name, working_dir, base_dir, file_type="Library")
11711171

1172-
robot_libdoc = LibraryDocumentation(name)
1172+
robot_libdoc = LibraryDocumentation(name + ("::" + args if args else ""))
11731173
robot_libdoc.convert_docs_to_html()
11741174
with io.StringIO() as output:
11751175
if get_robot_version() > (6, 0):

robotcode/language_server/robotframework/parts/code_action.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ def calc_md() -> str:
135135
with ProcessPoolExecutor(max_workers=1) as executor:
136136
result = executor.submit(
137137
get_robot_library_html_doc_str,
138-
name + ("::" + args if args else ""),
138+
name,
139+
args,
139140
base_dir=basedir if basedir else ".",
140141
theme=theme,
141142
).result(600)

0 commit comments

Comments
 (0)