chore(doc-gen): add spaces when removing linebreaks for Jade _data.json files

Closes #3623

Closes #3997
This commit is contained in:
Peter Bacon Darwin
2015-09-04 21:42:25 +01:00
parent 34b91c62c5
commit 9d42b52d2c
3 changed files with 44 additions and 1 deletions

View File

@ -44,7 +44,7 @@ module.exports = function addJadeDataDocsProcessor() {
title: _.map(path.basename(doc.fileInfo.baseName).split('_'), function(part) {
return titleCase(part);
}).join(' '),
intro: doc.description.replace('"', '\"').replace(/\r?\n|\r/g,"")
intro: doc.description.replace('"', '\"').replace(/\s*(\r?\n|\r)\s*/g," ")
}];
// GET DATA FOR EACH PAGE (CLASS, VARS, FUNCTIONS)