Skip to content

Commit 73cf640

Browse files
committed
Fix styles for links in object signatures
1 parent 88c5292 commit 73cf640

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22

3-
## [unreleased]
3+
## [Unreleased]
4+
5+
- Adjusted styles for links in object signatures to match those produced
6+
by python domain.9
47

58
- Releases are no longer uploaded to test version of PyPi.
69

sphinx_lua_ls/autodoc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,9 +659,9 @@ def render_root_docstring(
659659

660660
if self.root.require_type:
661661
typ = utils.normalize_type(self.root.require_type)
662-
ref_nodes, warn_nodes = sphinx_lua_ls.domain.LuaXRefRole()(
663-
"lua:obj", typ, typ, 0, self.state.inliner
664-
)
662+
ref_nodes, warn_nodes = sphinx_lua_ls.domain.LuaXRefRole(
663+
innernodeclass=sphinx.addnodes.desc_sig_name
664+
)("lua:obj", typ, typ, 0, self.state.inliner)
665665
content_node += docutils.nodes.paragraph(
666666
"",
667667
"",

test/test_regression/autodoc-emmylua-incongruent_export.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
require_2("incongruent_export"):
99
</span>
1010
<a class="reference internal" href="#lua-incongruent_export_2" title="incongruent_export_2">
11-
<code class="xref lua lua-obj docutils literal notranslate">
11+
<span class="xref lua lua-obj n">
1212
<span class="pre">
1313
incongruent_export_2
1414
</span>
15-
</code>
15+
</span>
1616
</a>
1717
</code>
1818
</p>

0 commit comments

Comments
 (0)