Permalink
Browse files

Ignore indentation inside multiline comments

Fixes #464
  • Loading branch information...
1 parent 6a80966 commit ce59af51a02a6fd219cc18afe202de92308ed2cd @norman norman committed Apr 30, 2012
Showing with 6 additions and 2 deletions.
  1. +3 −0 CHANGELOG.md
  2. +1 −0 REFERENCE.md
  3. +1 −1 lib/haml/parser.rb
  4. +1 −1 test/haml-spec
View
3 CHANGELOG.md
@@ -45,6 +45,9 @@
Internet Explorer earlier than version 9.
(thanks [Doug Mayer](https://github.com/doxavore))
+* Fix multiline silent comments: Haml previously did not allow free indentation
+ inside multline silent comments.
+
## 3.1.5 (Unreleased)
* Respect Rails' `html_safe` flag when escaping attribute values
View
1 REFERENCE.md
@@ -942,6 +942,7 @@ For example:
-#
This won't be displayed
Nor will this
+ Nor will this.
%p bar
is compiled to:
View
2 lib/haml/parser.rb
@@ -151,7 +151,7 @@ def parse
@parent = @parent.children.last
end
- if !flat? && @next_line.tabs - @line.tabs > 1
+ if !@haml_comment && !flat? && @next_line.tabs - @line.tabs > 1
raise SyntaxError.new("The line was indented #{@next_line.tabs - @line.tabs} levels deeper than the previous line.", @next_line.index)
end
2 test/haml-spec
@@ -1 +1 @@
-Subproject commit e0c6969fc1e054c8e6a91bc8edee319e4001064f
+Subproject commit 4164a878f6a4cec98d538ecc5ef6be3dbf34050e

0 comments on commit ce59af5

Please sign in to comment.