diff --git a/sphinx_js/templates/attribute.rst b/sphinx_js/templates/attribute.rst index 42067010..065c88da 100644 --- a/sphinx_js/templates/attribute.rst +++ b/sphinx_js/templates/attribute.rst @@ -5,7 +5,9 @@ {{ common.deprecated(deprecated)|indent(3) }} {% if type -%} - **type:** {{ type|indent(3) }} + .. rst-class:: js attribute type + + type: {{ type|indent(3) }} {%- endif %} {% if description -%} diff --git a/tests/test_build_ts/test_build_ts.py b/tests/test_build_ts/test_build_ts.py index ea554139..6ef5d560 100644 --- a/tests/test_build_ts/test_build_ts.py +++ b/tests/test_build_ts/test_build_ts.py @@ -101,7 +101,7 @@ def test_optional_members(self): "\n" " OptionalThings.boop?\n" "\n" - " **type:** boolean\n" + " type: boolean\n" "\n" " OptionalThings.foop?()\n", ) @@ -201,13 +201,13 @@ class GetSetDocs() GetSetDocs.a - **type:** number + type: number Getter with comment GetSetDocs.b - **type:** any + type: any Setter with comment """ @@ -226,7 +226,7 @@ class Base() Base.a - **type:** number + type: number Base.f()