lib/scss_lint/linter/string_quotes.rb in scss-lint-0.23.1 vs lib/scss_lint/linter/string_quotes.rb in scss-lint-0.24.0
- old
+ new
@@ -41,12 +41,11 @@
(//.*)? # Exclude any trailing comments that might have snuck in
\z
}x
def extract_string_without_quotes(source)
- if match = STRING_WITHOUT_QUOTES_REGEX.match(source)
- match[1]
- end
+ return unless match = STRING_WITHOUT_QUOTES_REGEX.match(source)
+ match[1]
end
def check_double_quotes(node, string)
if config['style'] == 'single_quotes'
add_lint(node, 'Prefer single quoted strings') if string !~ /'/