Skip to content

Commit

Permalink
Assume newline in tag text when preceding text
Browse files Browse the repository at this point in the history
I think it is safe to assume if you have:

  | foo
  em bar
  | baz

that you wish bar to contain a literal newline. If
this messes things up for anyone let me know.
  • Loading branch information
tj committed Oct 12, 2010
1 parent 91d01fa commit ae37241
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ Parser.prototype = {
// newline*
while (this.peek.type === 'newline') this.advance;

// Assume newline when tag followed by text
if (tag.text && this.peek.type === 'text') tag.text.push('\\n');

// block?
if (this.peek.type === 'indent') {
var block = this.parseBlock();
Expand Down

0 comments on commit ae37241

Please sign in to comment.