diff options
author | Jakob Lykke Andersen <Jakob@caput.dk> | 2021-10-03 09:49:34 +0200 |
---|---|---|
committer | Jakob Lykke Andersen <Jakob@caput.dk> | 2021-10-03 10:18:51 +0200 |
commit | 44835bff3387fbf4aec709f77c7cbf7ba947c307 (patch) | |
tree | de61aacd6cfc3e4b01f62f49969d33f36aca11ca | |
parent | 422068618632524914643bfb7dd4d5658f60f7b9 (diff) | |
download | sphinx-git-44835bff3387fbf4aec709f77c7cbf7ba947c307.tar.gz |
js nodes, update CHANGES and rename variable
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | sphinx/domains/javascript.py | 10 |
2 files changed, 8 insertions, 8 deletions
@@ -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 ---------- diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py index 7d5958590..e48f821e8 100644 --- a/sphinx/domains/javascript.py +++ b/sphinx/domains/javascript.py @@ -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 |