js nodes, update CHANGES and rename variable

This commit is contained in:
Jakob Lykke Andersen
2021-10-03 09:49:34 +02:00
parent 4220686186
commit 44835bff33
2 changed files with 8 additions and 8 deletions

View File

@@ -15,10 +15,10 @@ Incompatible changes
* #9672: the signature of
:py:meth:`domains.py.PyObject.get_signature_prefix` has changed to
return a list of nodes instead of a plain string.
* ``domains.js.JSObject.display_prefix`` has been changed into a method
* #9695: ``domains.js.JSObject.display_prefix`` has been changed into a method
``get_display_prefix`` which now returns a list of nodes
instead of a plain string.
* The rendering of Javascript domain declarations is implemented
* #9695: The rendering of Javascript domain declarations is implemented
with more docutils nodes to allow better CSS styling.
It may break existing styling.
@@ -36,7 +36,7 @@ Features added
for :rst:dir:`c:function` and :rst:dir:`c:macro`.
* C++, added new info-field ``retval`` for :rst:dir:`cpp:function`.
* #9672: More CSS classes on Python domain descriptions
* More CSS classes on Javascript domain descriptions
* #9695: More CSS classes on Javascript domain descriptions
Bugs fixed
----------

View File

@@ -97,14 +97,14 @@ class JSObject(ObjectDescription[Tuple[str, str]]):
if display_prefix:
signode += addnodes.desc_annotation('', '', *display_prefix)
actualPrefix = None
actual_prefix = None
if prefix:
actualPrefix = prefix
actual_prefix = prefix
elif mod_name:
actualPrefix = mod_name
if actualPrefix:
actual_prefix = mod_name
if actual_prefix:
addName = addnodes.desc_addname('', '')
for p in actualPrefix.split('.'):
for p in actual_prefix.split('.'):
addName += addnodes.desc_sig_name(p, p)
addName += addnodes.desc_sig_punctuation('.', '.')
signode += addName