mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
hide source location if outputSourceFiles is false (#571)
revised fix to address the regression in #592
This commit is contained in:
parent
3caf49520d
commit
39daa9ab23
@ -468,21 +468,25 @@ exports.publish = function(taffyData, opts, tutorials) {
|
||||
var members = helper.getMembers(data);
|
||||
members.tutorials = tutorials.children;
|
||||
|
||||
// output pretty-printed source files by default
|
||||
var outputSourceFiles = conf['default'] && conf['default'].outputSourceFiles !== false ? true :
|
||||
false;
|
||||
|
||||
// add template helpers
|
||||
view.find = find;
|
||||
view.linkto = linkto;
|
||||
view.resolveAuthorLinks = resolveAuthorLinks;
|
||||
view.tutoriallink = tutoriallink;
|
||||
view.htmlsafe = htmlsafe;
|
||||
view.outputSourceFiles = outputSourceFiles;
|
||||
|
||||
// once for all
|
||||
view.nav = buildNav(members);
|
||||
attachModuleSymbols( find({ kind: ['class', 'function'], longname: {left: 'module:'} }),
|
||||
members.modules );
|
||||
|
||||
// output pretty-printed source files by default; do this before generating any other pages, so
|
||||
// that the other pages can link to the source files
|
||||
if (!conf['default'] || conf['default'].outputSourceFiles !== false) {
|
||||
// generate the pretty-printed source files first so other pages can link to them
|
||||
if (outputSourceFiles) {
|
||||
generateSourceFiles(sourceFiles, opts.encoding);
|
||||
}
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ if (data.defaultvalue && data.defaultvaluetype === 'object') {
|
||||
</ul></dd>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.meta) {?>
|
||||
<?js if (data.meta && self.outputSourceFiles) {?>
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<?js= self.linkto(meta.shortpath) ?>, <?js= self.linkto(meta.shortpath, 'line ' + meta.lineno, null, 'line' + meta.lineno) ?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user