diff --git a/doc-src/SASS_CHANGELOG.md b/doc-src/SASS_CHANGELOG.md index 0f7ffa6f..97819a37 100644 --- a/doc-src/SASS_CHANGELOG.md +++ b/doc-src/SASS_CHANGELOG.md @@ -8,6 +8,9 @@ * Use `Rails.env` rather than `RAILS_ENV` when running under Rails 3.0. Thanks to [Duncan Grazier](http://duncangrazier.com/). +* Support `:line_numbers` as an alias for {file:SASS_REFERENCE.md#line_numbers-option `:line_comments`}, + since that's what the docs have said forever. + ## [2.2.17](http://github.com/nex3/haml/commit/2.2.16) * When the {file:SASS_REFERENCE.md#full_exception-option `:full_exception` option} diff --git a/doc-src/SASS_REFERENCE.md b/doc-src/SASS_REFERENCE.md index 53711f71..a2a77cf8 100644 --- a/doc-src/SASS_REFERENCE.md +++ b/doc-src/SASS_REFERENCE.md @@ -205,6 +205,7 @@ Available options are: where a selector is defined to be emitted into the compiled CSS as a comment. Useful for debugging especially when using imports and mixins. + This option may also be called `:line_comments`. {#custom-option} `:custom` : An option that's available for individual applications to set diff --git a/lib/sass/engine.rb b/lib/sass/engine.rb index 2998d4aa..f8d639ae 100644 --- a/lib/sass/engine.rb +++ b/lib/sass/engine.rb @@ -144,6 +144,10 @@ module Sass @options = DEFAULT_OPTIONS.merge(options.reject {|k, v| v.nil?}) @template = template + # Support both, because the docs said one and the other actually worked + # for quite a long time. + @options[:line_comments] ||= @options[:line_numbers] + # Backwards compatibility @options[:property_syntax] ||= @options[:attribute_syntax] case @options[:property_syntax]