diff --git a/tasks/compile-docs.js b/tasks/compile-docs.js index 078aa4e56b..2c3d043645 100644 --- a/tasks/compile-docs.js +++ b/tasks/compile-docs.js @@ -87,7 +87,7 @@ _.extend(Compiler.prototype, { // Attempts to replace extension of content links to other documents compiledContents = compiledContents.replace(/.md/g, '.html'); - return compiledContents.stripBrTags(); + return compiledContents; }, getPageTitle: function(compiledContents) { @@ -109,7 +109,8 @@ _.extend(Compiler.prototype, { var description = compiledContents.match(/

([\s\S]*?)<\/p>/)[1]; return description - .stripBrTags() + // force translation of breaks to a space + .replace(/
/g, ' ') // remove remaining tags .replace(/\<[^\>]*\>/g, ''); // } @@ -325,6 +326,3 @@ module.exports = function(grunt) { .then(this.async()); }); }; - -String.prototype.stripBrTags = function() { return this.replace(/
/g, ' '); } -