mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
js nodes, update CHANGES and rename variable
This commit is contained in:
6
CHANGES
6
CHANGES
@@ -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
|
||||
----------
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user