diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-04-23 01:02:29 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-04-23 16:31:33 +0900 |
commit | 96fa6d2972ea7c77525607ec490daed9e303535d (patch) | |
tree | 610c22b6788db2b6c5449cf4819fa5ac190e30d6 /sphinx/domains/javascript.py | |
parent | db377ceb5524ec276ac6d18ed3206b8147800ae7 (diff) | |
download | sphinx-git-96fa6d2972ea7c77525607ec490daed9e303535d.tar.gz |
Implement get_full_qualified_name() to JavascriptDomain (refs: #3630)
Diffstat (limited to 'sphinx/domains/javascript.py')
-rw-r--r-- | sphinx/domains/javascript.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py index 9d6bf1908..9ecf4a4b0 100644 --- a/sphinx/domains/javascript.py +++ b/sphinx/domains/javascript.py @@ -398,6 +398,16 @@ class JavaScriptDomain(Domain): yield refname, refname, type, docname, \ refname.replace('$', '_S_'), 1 + def get_full_qualified_name(self, node): + # type: (nodes.Node) -> unicode + modname = node.get('js:module') + prefix = node.get('js:object') + target = node.get('reftarget') + if target is None: + return None + else: + return '.'.join(filter(None, [modname, prefix, target])) + def setup(app): # type: (Sphinx) -> Dict[unicode, Any] |