diff --git a/lib/haml/precompiler.rb b/lib/haml/precompiler.rb index e9d3b7be..8f7714b7 100644 --- a/lib/haml/precompiler.rb +++ b/lib/haml/precompiler.rb @@ -197,6 +197,14 @@ END when SILENT_SCRIPT return start_haml_comment if text[1] == SILENT_COMMENT + raise SyntaxError.new(< "Self-closing tags can't have content.", " %p foo" => "Indenting at the beginning of the document is illegal.", " %p foo" => "Indenting at the beginning of the document is illegal.", + "- end" => < ["Indenting at the beginning of the document is illegal.", 3], # Regression tests