Rubcop found some new offenses
This commit is contained in:
parent
747ca86212
commit
79dbfa0238
|
@ -23,7 +23,7 @@ module Middleman
|
|||
# If we've already got a matching extension that passed the
|
||||
# version check, bail out.
|
||||
return if registered.key?(name.to_sym) &&
|
||||
!registered[name.to_sym].is_a?(String)
|
||||
!registered[name.to_sym].is_a?(String)
|
||||
|
||||
registered[name.to_sym] = if block_given?
|
||||
block
|
||||
|
|
|
@ -31,7 +31,7 @@ module Middleman
|
|||
mail_addr = el.attr['href'].sub(/\Amailto:/, '')
|
||||
href = obfuscate('mailto') << ':' << obfuscate(mail_addr)
|
||||
content = obfuscate(content) if content == mail_addr
|
||||
return %Q(<a href="#{href}">#{content}</a>)
|
||||
return %(<a href="#{href}">#{content}</a>)
|
||||
end
|
||||
|
||||
attr = el.attr.dup
|
||||
|
|
|
@ -61,7 +61,7 @@ module Middleman
|
|||
middleman_app.image_tag(link, title: title, alt: alt_text)
|
||||
else
|
||||
link_string = link.dup
|
||||
link_string << %Q("#{title}") if title && title.length > 0 && title != alt_text
|
||||
link_string << %("#{title}") if title && title.length > 0 && title != alt_text
|
||||
"![#{alt_text}](#{link_string})"
|
||||
end
|
||||
end
|
||||
|
@ -74,7 +74,7 @@ module Middleman
|
|||
middleman_app.link_to(content, link, attributes)
|
||||
else
|
||||
link_string = link.dup
|
||||
link_string << %Q("#{title}") if title && title.length > 0 && title != alt_text
|
||||
link_string << %("#{title}") if title && title.length > 0 && title != alt_text
|
||||
"[#{content}](#{link_string})"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,9 +21,9 @@ module Middleman
|
|||
# @return [Boolean]
|
||||
def ignored?
|
||||
@app.ignore_manager.ignored?(path) ||
|
||||
(!proxy? &&
|
||||
@app.ignore_manager.ignored?(source_file.sub("#{@app.source_dir}/", ''))
|
||||
)
|
||||
(!proxy? &&
|
||||
@app.ignore_manager.ignored?(source_file.sub("#{@app.source_dir}/", ''))
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
|
|||
|
||||
# The helpers
|
||||
helpers do
|
||||
|
||||
# Make all block content html_safe
|
||||
# rubocop:disable Semicolon
|
||||
def content_tag(name, content=nil, options=nil, &block)
|
||||
|
|
|
@ -226,12 +226,12 @@ class Middleman::CoreExtensions::Internationalization < ::Middleman::Extension
|
|||
|
||||
if lang_suffix
|
||||
super(suffixed_partial_name, maybe_static) ||
|
||||
super(File.join(locals_dir, suffixed_partial_name), maybe_static) ||
|
||||
super(partials_path, try_static) ||
|
||||
super
|
||||
super(File.join(locals_dir, suffixed_partial_name), maybe_static) ||
|
||||
super(partials_path, try_static) ||
|
||||
super
|
||||
else
|
||||
super(partials_path, try_static) ||
|
||||
super
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue