Permalink
Browse files

Merge branch 'stable'

  • Loading branch information...
2 parents ddd4bc2 + d39340f commit e4dca405e8c9d97b1ab3826d3831d358080421ef @nex3 nex3 committed Mar 6, 2010
Showing with 4 additions and 1 deletion.
  1. +2 −0 doc-src/HAML_CHANGELOG.md
  2. +2 −1 lib/haml/precompiler.rb
@@ -212,6 +212,8 @@ that surrounds the filtered text with `<style>` and CDATA tags.
According to [this bug report](http://github.com/carlhuda/bundler/issues/issue/44),
this should make Haml work better with Bundler.
+* Make the error message for `- end` a little more intuitive based on user feedback.
+
## 2.2.20
[Tagged on GitHub](http://github.com/nex3/haml/commit/2.2.20).
@@ -245,11 +245,12 @@ def process_line(text, index)
return start_haml_comment if text[1] == SILENT_COMMENT
raise SyntaxError.new(<<END.rstrip, index) if text[1..-1].strip == "end"
-You don't need to use "- end" in Haml. Use indentation instead:
+You don't need to use "- end" in Haml. Un-indent to close a block:
- if foo?
%strong Foo!
- else
Not foo.
+%p This line is un-indented, so it isn't part of the "if" block
END
push_silent(text[1..-1], true)

0 comments on commit e4dca40

Please sign in to comment.