diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-05-26 11:07:13 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-05-26 11:07:13 +0200 |
commit | 7b915428f7b780e49b641639c6ba7166132ac87c (patch) | |
tree | cda58a837ed687a995bf5636781b3f381bc852db | |
parent | 0bce3517fdc05491ace7a8df9bca84f001da6904 (diff) | |
download | gitbook-7b915428f7b780e49b641639c6ba7166132ac87c.zip gitbook-7b915428f7b780e49b641639c6ba7166132ac87c.tar.gz gitbook-7b915428f7b780e49b641639c6ba7166132ac87c.tar.bz2 |
Fix #1316: fix regression for supporting uppercase filenames in structure
-rw-r--r-- | lib/constants/__tests__/configSchema.js | 10 | ||||
-rw-r--r-- | lib/constants/configSchema.js | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/constants/__tests__/configSchema.js b/lib/constants/__tests__/configSchema.js index 1541219..efc99b9 100644 --- a/lib/constants/__tests__/configSchema.js +++ b/lib/constants/__tests__/configSchema.js @@ -22,6 +22,16 @@ describe('configSchema', function() { expect(result.errors.length).toBe(0); }); + it('should accept uppercase in filename', function() { + var result = validate({ + structure: { + readme: 'BOOK.adoc' + } + }); + + expect(result.errors.length).toBe(0); + }); + it('should not accept filepath', function() { var result = validate({ structure: { diff --git a/lib/constants/configSchema.js b/lib/constants/configSchema.js index 9a45bb3..e693977 100644 --- a/lib/constants/configSchema.js +++ b/lib/constants/configSchema.js @@ -1,4 +1,4 @@ -var FILENAME_REGEX = '^[a-z-._\d,\s]+$'; +var FILENAME_REGEX = '^[a-zA-Z-._\d,\s]+$'; module.exports = { '$schema': 'http://json-schema.org/schema#', |