typo fix in template helper and changes for split path and filename in doclet.meta

This commit is contained in:
Jannon 2012-03-16 03:06:26 -07:00
parent cf023b0461
commit 00f3ed8dc6
2 changed files with 7 additions and 3 deletions

View File

@ -577,7 +577,11 @@ function setDocletDescriptionToValue(doclet, tag) {
}
function setNameToFile(doclet, tag) {
if (doclet.meta.filename) { doclet.addTag( 'name', 'file:'+doclet.meta.filename ); }
if (doclet.meta.filename) {
var name = 'file:';
if (doclet.meta.path) { name += doclet.meta.path + java.lang.System.getProperty("file.separator"); }
doclet.addTag( 'name', name + doclet.meta.filename );
}
}
function setDocletMemberof(doclet, tag) {
@ -599,7 +603,7 @@ function applyNamespace(docletOrNs, tag) {
}
function setDocletNameToFilename(doclet, tag) {
var name = doclet.meta.filename;
var name = (doclet.meta.path ? (doclet.meta.path + java.lang.System.getProperty("file.separator")) : "") + doclet.meta.filename;
name = name.replace(/\.js$/i, '');
for (var i = 0, len = env.opts._.length; i < len; i++) {

View File

@ -71,7 +71,7 @@ var nsprefix = /^(event|module|external):/;
function strToFilename(str) {
// allow for namespace prefix
var basename = str.replace(nsPrefix, '$1-');
var basename = str.replace(nsprefix, '$1-');
if ( /[^$a-z0-9._-]/i.test(basename) ) {
return hash.hex_md5(str).substr(0, 10);