mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
jsdoc: Handle renaming of _global_ scope more consistently, also in links.
This commit is contained in:
parent
a62b28a6b9
commit
2ed323a73a
3 changed files with 8 additions and 7 deletions
|
@ -132,10 +132,13 @@ Link.prototype._makeSymbolLink = function(alias, parameters) {
|
|||
if (parameters) {
|
||||
parameters = parameters.replace(/\,([^\s])/, ', $1')
|
||||
}
|
||||
|
||||
|
||||
var linkText = (this.text || (alias == '_global_' && publish.conf.globalName
|
||||
|| alias)) + (parameters || '');
|
||||
|
||||
// if there is no symbol by that name just return the name unaltered
|
||||
if (!linkTo) {
|
||||
return this.text || alias + (parameters || '');
|
||||
return linkText;
|
||||
} else {
|
||||
// it's a symbol in another file
|
||||
if (!linkTo.is("CONSTRUCTOR") && !linkTo.isNamespace) { // it's a method or property
|
||||
|
@ -151,8 +154,6 @@ Link.prototype._makeSymbolLink = function(alias, parameters) {
|
|||
}
|
||||
linkPath = linkBase + linkPath
|
||||
}
|
||||
|
||||
var linkText= (this.text || alias) + (parameters || '');
|
||||
|
||||
var link = {
|
||||
linkPath: linkPath,
|
||||
|
|
|
@ -157,8 +157,8 @@ var Render = new function() {
|
|||
param.operators[name].push(operator);
|
||||
}
|
||||
}
|
||||
var name = param.name == '_global_'
|
||||
? publish.conf.globalName : param.name;
|
||||
var name = param.name == '_global_' && publish.conf.globalName
|
||||
|| param.name;
|
||||
publish.curClass = {
|
||||
name: name,
|
||||
index: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="reference-class">
|
||||
<if test="publish.conf.renderMode == 'docs'"><h1>{+ data.name == '_global_' ? publish.conf.globalName : data.name +}</h1></if>
|
||||
<if test="publish.conf.renderMode == 'docs'"><h1>{+ data.name == '_global_' && publish.conf.globalName || data.name +}</h1></if>
|
||||
<if test="data.inheritedLinks">
|
||||
<p> Extends {+ data.inheritedLinks +}</p>
|
||||
</if>
|
||||
|
|
Loading…
Reference in a new issue