lib/sass/tree/rule_node.rb in sass-3.4.25 vs lib/sass/tree/rule_node.rb in sass-3.5.0.pre.rc.1
- old
+ new
@@ -38,11 +38,11 @@
# * This node is in a CSS tree
# * The style is :nested
# * This is a child rule of another rule
# * The parent rule has properties, and thus will be rendered
#
- # @return [Integer]
+ # @return [Fixnum]
attr_accessor :tabs
# The entire selector source range for this rule.
# @return [Sass::Source::Range]
attr_accessor :selector_source_range
@@ -118,11 +118,12 @@
# 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))),
+ {:filename => filename &&
+ ("file://" + URI::DEFAULT_PARSER.escape(File.expand_path(filename))),
:line => line}
end
# A rule node is invisible if it has only placeholder selectors.
def invisible?
@@ -135,21 +136,12 @@
@parsed_rules = nil
return unless @rule.all? {|t| t.is_a?(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 = nil
- warnings = Sass::Util.silence_warnings do
- parser = Sass::SCSS::StaticParser.new(@rule.join.strip, nil, nil, 1)
- # rubocop:disable RescueModifier
- @parsed_rules = parser.parse_selector rescue nil
- # rubocop:enable RescueModifier
-
- $stderr.string
- end
-
- # If parsing produces a warning, throw away the result so we can parse
- # later with the real filename info.
- @parsed_rules = nil unless warnings.empty?
+ parser = Sass::SCSS::StaticParser.new(@rule.join.strip, nil, nil, 1)
+ # rubocop:disable RescueModifier
+ @parsed_rules = parser.parse_selector rescue nil
+ # rubocop:enable RescueModifier
end
end
end