Skip to content

Commit

Permalink
Revert "Add String method to strip <br> tags from markdown, call in d…
Browse files Browse the repository at this point in the history
…oc compilation"

This reverts commit 1aec344.
  • Loading branch information
thenickcox committed Apr 1, 2015
1 parent 1aec344 commit 693e8ed
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tasks/compile-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -109,7 +109,8 @@ _.extend(Compiler.prototype, {
var description = compiledContents.match(/<p>([\s\S]*?)<\/p>/)[1];

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

String.prototype.stripBrTags = function() { return this.replace(/<br>/g, ' '); }

0 comments on commit 693e8ed

Please sign in to comment.