mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
use a dash to prevent filenames from starting with an underscore
This commit is contained in:
parent
16f8270430
commit
8ccbb1b435
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user