lib/sass/tree/rule_node.rb in sass-3.3.0.alpha.256 vs lib/sass/tree/rule_node.rb in sass-3.3.0.alpha.353

- old
+ new

@@ -109,16 +109,17 @@ last.is_a?(String) && last[-1] == ?, end # A hash that will be associated with this rule in the CSS document # if the {file:SASS_REFERENCE.md#debug_info-option `:debug_info` option} is enabled. - # This data is used by e.g. [the FireSass Firebug extension](https://addons.mozilla.org/en-US/firefox/addon/103988). + # This data is used by e.g. [the FireSass Firebug + # extension](https://addons.mozilla.org/en-US/firefox/addon/103988). # # @return [{#to_s => #to_s}] def debug_info {:filename => filename && ("file://" + Sass::Util.escape_uri(File.expand_path(filename))), - :line => self.line} + :line => line} end # A rule node is invisible if it has only placeholder selectors. def invisible? resolved_rules.members.all? {|seq| seq.has_placeholder?} @@ -129,10 +130,12 @@ def try_to_parse_non_interpolated_rules if @rule.all? {|t| t.kind_of?(String)} # We don't use real filename/line info because we don't have it yet. # When we get it, we'll set it on the parsed rules if possible. parser = Sass::SCSS::StaticParser.new(@rule.join.strip, '', nil, 1) + # rubocop:disable RescueModifier @parsed_rules = parser.parse_selector rescue nil + # rubocop:enable RescueModifier end end end end