From 8ccbb1b435aa6aa6db198be86bcec665a7a99505 Mon Sep 17 00:00:00 2001 From: Jeff Williams Date: Thu, 18 Dec 2014 20:20:29 -0800 Subject: [PATCH] use a dash to prevent filenames from starting with an underscore --- lib/jsdoc/util/templateHelper.js | 2 +- test/specs/jsdoc/util/templateHelper.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jsdoc/util/templateHelper.js b/lib/jsdoc/util/templateHelper.js index 28843ef8..035e85ad 100644 --- a/lib/jsdoc/util/templateHelper.js +++ b/lib/jsdoc/util/templateHelper.js @@ -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(); } diff --git a/test/specs/jsdoc/util/templateHelper.js b/test/specs/jsdoc/util/templateHelper.js index e068465d..940bb5eb 100644 --- a/test/specs/jsdoc/util/templateHelper.js +++ b/test/specs/jsdoc/util/templateHelper.js @@ -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() {