Skip to content

Commit

Permalink
Merge commit 'origin/stable' into stable
Browse files Browse the repository at this point in the history
Conflicts:
	doc-src/SASS_CHANGELOG.md
  • Loading branch information
nex3 committed Sep 14, 2009
2 parents 7577212 + 91591b1 commit 5c00337
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions doc-src/HAML_CHANGELOG.md
Expand Up @@ -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)
Expand Down
9 changes: 6 additions & 3 deletions doc-src/SASS_CHANGELOG.md
Expand Up @@ -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)

Expand Down
5 changes: 5 additions & 0 deletions doc-src/SASS_REFERENCE.md
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions lib/sass/tree/prop_node.rb
Expand Up @@ -42,9 +42,9 @@ def ==(other)
# @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] == ?;
Expand Down
2 changes: 2 additions & 0 deletions test/sass/engine_test.rb
Expand Up @@ -255,12 +255,14 @@ def test_colon_only
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)
Expand Down

0 comments on commit 5c00337

Please sign in to comment.