use a dash to prevent filenames from starting with an underscore

This commit is contained in:
Jeff Williams 2014-12-18 20:20:29 -08:00
parent 16f8270430
commit 8ccbb1b435
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ function makeUniqueFilename(filename, str) {
// don't allow filenames to begin with an underscore
if (!filename.length || filename[0] === '_') {
filename = 'X' + filename;
filename = '-' + filename;
key = filename.toLowerCase();
}

View File

@ -212,7 +212,7 @@ describe("jsdoc/util/templateHelper", function() {
});
it('should not allow a filename to start with an underscore', function() {
expect( helper.getUniqueFilename('') ).toBe('X_.html');
expect( helper.getUniqueFilename('') ).toBe('-_.html');
});
it('should not return the same filename twice', function() {