diff options
Diffstat (limited to 'lib/constants/configSchema.js')
-rw-r--r-- | lib/constants/configSchema.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/constants/configSchema.js b/lib/constants/configSchema.js index 3fb2050..b9de04a 100644 --- a/lib/constants/configSchema.js +++ b/lib/constants/configSchema.js @@ -1,3 +1,5 @@ +var FILENAME_REGEX = '^[0-9a-zA-Z ... ]+$'; + module.exports = { '$schema': 'http://json-schema.org/schema#', 'id': 'https://gitbook.com/schemas/book.json', @@ -57,25 +59,25 @@ module.exports = { 'default': 'LANGS.md', 'type': 'string', 'title': 'File to use as languages index', - 'pattern': '^[0-9a-zA-Z ... ]+$' + 'pattern': FILENAME_REGEX }, 'readme': { 'default': 'README.md', 'type': 'string', 'title': 'File to use as preface', - 'pattern': '^[0-9a-zA-Z ... ]+$' + 'pattern': FILENAME_REGEX }, 'glossary': { 'default': 'GLOSSARY.md', 'type': 'string', 'title': 'File to use as glossary index', - 'pattern': '^[0-9a-zA-Z ... ]+$' + 'pattern': FILENAME_REGEX }, 'summary': { 'default': 'SUMMARY.md', 'type': 'string', 'title': 'File to use as table of contents', - 'pattern': '^[0-9a-zA-Z ... ]+$' + 'pattern': FILENAME_REGEX } }, 'additionalProperties': false |