Fix broken link to languagePluginLoader in js API summary (#1362)

This commit is contained in:
Hood Chatham 2021-03-22 09:42:07 -07:00 committed by GitHub
parent ccd0f1335b
commit 85dd7485de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -130,8 +130,7 @@ def get_jsdoc_summary_directive(app):
result = []
for group in ["global", "attribute", "function"]:
result.append(self.format_heading(group.title() + "s:"))
group_objects = app._sphinxjs_analyzer.js_docs[group]
table_items = self.get_summary_table(group_objects)
table_items = self.get_summary_table(group)
table_markup = self.format_table(table_items)
result.extend(table_markup)
return result
@ -182,7 +181,8 @@ def get_jsdoc_summary_directive(app):
argument of format_table.
"""
pkgname = "globalThis." if group == "global" else "pyodide."
return [self.get_summary_row(pkgname, obj) for obj in group]
group_objects = app._sphinxjs_analyzer.js_docs[group]
return [self.get_summary_row(pkgname, obj) for obj in group_objects]
# This following method is copied almost verbatim from autosummary
# (where it is called get_table).

View File

@ -117,9 +117,9 @@ def test_extract_summary():
def test_summary():
globals = jsdoc_summary.get_summary_table(pyodide_analyzer.js_docs["global"])
attributes = jsdoc_summary.get_summary_table(pyodide_analyzer.js_docs["attribute"])
functions = jsdoc_summary.get_summary_table(pyodide_analyzer.js_docs["function"])
globals = jsdoc_summary.get_summary_table("global")
attributes = jsdoc_summary.get_summary_table("attribute")
functions = jsdoc_summary.get_summary_table("function")
set(globals) == {
(
"languagePluginLoader",