Skip to content

Commit

Permalink
fix: missing simple linebreaks in story
Browse files Browse the repository at this point in the history
  • Loading branch information
p3k committed Aug 14, 2015
1 parent 22bd98f commit 34af2b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/Story/Story.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,8 @@ Story.prototype.linebreak_filter = function (value, param, mode) {
var mdQuoteMarker = new RegExp('<!--av-quote-->', 'g');
var mdCodeMarker = new RegExp('<!--av-code-->', 'g');
return value
// Replace regular linebreaks with Markdown marker
.replace(/(\n|\r|\r\n)/gm, mdLineBreakMarker.source + '$1')
// Prevent Markdown for linebreaks (lines ending with 2 spaces)
// as well as code segments (4 spaces) to be removed by Helma’s format() method
.replace(/ {2}$/gm, mdLineBreakMarker.source)
Expand Down

0 comments on commit 34af2b0

Please sign in to comment.