Permalink
Browse files

\r\n is also a newline

  • Loading branch information...
1 parent 69dcd25 commit a38afab88fbd8de1f185b126e0c90a3dbe040da8 @judofyr judofyr committed Mar 5, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mustache/parser.rb
View
@@ -193,7 +193,7 @@ def scan_tags
# the remaining whitespace. If not, but we've been hanging on to padding
# from the beginning of the line, re-insert the padding as static text.
if start_of_line
- if @scanner.peek(1) == "\n" && SKIP_WHITESPACE.include?(type)
+ if @scanner.peek(2) =~ /\r?\n/ && SKIP_WHITESPACE.include?(type)
@scanner.skip(/[ \t]*\n/)
else
prev.insert(last_index, [:static, padding]) unless padding.empty?

0 comments on commit a38afab

Please sign in to comment.