Skip to content

Commit 28434d3

Browse files
committed
add iframe_id
1 parent 92add9c commit 28434d3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mkdocs_swagger_ui_tag/plugin.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def render_template(openapi_spec_url, swagger_ui_ele):
165165
with open(os.path.join(page_dir, iframe_filename), "w") as f:
166166
f.write(template_output)
167167
self.replace_with_iframe(soup, swagger_ui_ele, cur_id, iframe_filename)
168+
return cur_id
168169

169170
for swagger_ui_ele in swagger_ui_list:
170171
if swagger_ui_ele.has_attr("grouped"):
@@ -174,8 +175,10 @@ def render_template(openapi_spec_url, swagger_ui_ele):
174175
openapi_spec_url = self.path_to_url(
175176
page.file, swagger_ui_ele.get("src", "")
176177
)
177-
render_template(
178-
openapi_spec_url=openapi_spec_url, swagger_ui_ele=swagger_ui_ele
178+
iframe_id_list.append(
179+
render_template(
180+
openapi_spec_url=openapi_spec_url, swagger_ui_ele=swagger_ui_ele
181+
)
179182
)
180183

181184
if grouped_list:

0 commit comments

Comments
 (0)