1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Merge commit 'origin/stable' into stable

Conflicts:
	doc-src/SASS_CHANGELOG.md
This commit is contained in:
Nathan Weizenbaum 2009-09-14 03:39:03 -07:00
commit 5c003379b6
5 changed files with 17 additions and 7 deletions

View file

@ -32,8 +32,8 @@ This has always been incorrect behavior,
and in fact has never actually worked.
The only difference is that now it will fail loudly.
Second, Ruby 1.9 is now more fully supported,
especially with the {file:HAML_REFERENCE#htmlstyle_attributes_ new attribute syntax}.
Third, filters are no longer escaped when the {file:HAML_REFERENCE#escape_html-option `:escape_html` option}
especially with the {file:HAML_REFERENCE.md#htmlstyle_attributes_ new attribute syntax}.
Third, filters are no longer escaped when the {file:HAML_REFERENCE.md#escape_html-option `:escape_html` option}
is enabled and `#{}` interpolation is used.
## [2.2.1](http://github.com/nex3/haml/commit/2.2.1)

View file

@ -5,9 +5,12 @@
## 2.2.4
Don't add `require 'rubygems'` to the top of init.rb when installed
via `sass --rails`. This isn't necessary, and actually gets
clobbered as soon as haml/template is loaded.
* Don't add `require 'rubygems'` to the top of init.rb when installed
via `sass --rails`. This isn't necessary, and actually gets
clobbered as soon as haml/template is loaded.
* Document the previously-undocumented {file:SASS_REFERENCE.md#line-option `:line` option},
which allows the number of the first line of a Sass file to be set for error reporting.
## [2.2.3](http://github.com/nex3/haml/commit/2.2.3)

View file

@ -186,6 +186,11 @@ Available options are:
This is used solely for reporting errors,
and is automatically set when using Rails or Merb.
{#line-option} `:line`
: The number of the first line of the Sass template.
Used for reporting line numbers for errors.
This is useful to set if the Sass template is embedded in a Ruby file.
{#load_paths-option} `:load_paths`
: An array of filesystem paths which should be searched
for Sass templates imported with the [`@import`](#import) directive.

View file

@ -42,9 +42,9 @@ module Sass::Tree
# @raise [Sass::SyntaxError] if the property uses invalid syntax
def to_s(tabs, parent_name = nil)
if @options[:property_syntax] == :old && @prop_syntax == :new
raise Sass::SyntaxError.new("Illegal property syntax: can't use new syntax when :property_syntax => :old is set.")
raise Sass::SyntaxError.new("Illegal property syntax: can't use new syntax when :property_syntax => :old is set.", @line)
elsif @options[:property_syntax] == :new && @prop_syntax == :old
raise Sass::SyntaxError.new("Illegal property syntax: can't use old syntax when :property_syntax => :new is set.")
raise Sass::SyntaxError.new("Illegal property syntax: can't use old syntax when :property_syntax => :new is set.", @line)
end
if value[-1] == ?;

View file

@ -255,12 +255,14 @@ SASS
rescue Sass::SyntaxError => e
assert_equal("Illegal property syntax: can't use new syntax when :property_syntax => :old is set.",
e.message)
assert_equal(2, e.sass_line)
else
assert(false, "SyntaxError not raised for :property_syntax => :old")
end
begin
render("a\n :b c", :property_syntax => :new)
assert_equal(2, e.sass_line)
rescue Sass::SyntaxError => e
assert_equal("Illegal property syntax: can't use old syntax when :property_syntax => :new is set.",
e.message)